MTW
About
MTW API is used by MoreThanWallet for its needs.
General
This API supports only a small set of coins and periods.
Allowed coins: bitcoin, ethereum, cardano, binancecoin, shiba-inu, chainlink, dogecoin.
Allowed periods: 1, 30, 365.
OHLC data entry is an array of 5 numbers and has the following format:
| Field | Description |
|---|---|
| 1st | UNIX time the data belongs to. |
| 2nd | Open price. |
| 3rd | High price. |
| 4th | Low price. |
| 5th | Close price. |
Routes
GET /mtw/mdata
Get metadata about OHLC info of coins.
Example:
100 1011 100 1011 0 0 342k 0 --:--:-- --:--:-- --:--:-- 493k
{
"lastUpdate": null,
"data": [
{
"coin": "bitcoin",
"period": "1",
"length": 48
}
],
"service": "MTW-MDATA"
}
Result fields
| Field | Type | Description |
|---|---|---|
| lastUpdate | number / null | Time of last update. |
| data | array | Array of objects with metadata about OHLC info of coins. |
| service | string | Service to which the data belongs. |
Data entry fields
| Field | Type | Description |
|---|---|---|
| coin | string | One of the allowed coins. |
| period | string | One of the allowed periods. |
| length | number | Amount of entries of OHLC info for given coin and period. |
GET /mtw/mdata/restart
Previously should have cleared all the data and started fetching anew, but since it's a massive vulnarebility, now it does not do anything. Left for compatability.
GET /mtw/mdata/errors
Previously should have returned errors, but after rework there is no place to have errors, so returns empty array. Left for compatability.
GET /mtw/mdata/data
Get OHLC info of all the coins for all the periods.
Returns a record with coin names as keys and values are records with periods as keys and arrays of OHLC data as values.
Example:
{
"cardano": {
"1": [[1759323600000, 0.835945, 0.835945, 0.834412, 0.834412]]
}
}
GET /mtw/mdata/item/{coin}/{period}
Get array of OHLC data for one particular coin for one particular period of time.
Example:
[[1759323600000, 0.835945, 0.835945, 0.834412, 0.834412]]
GET /mtw/mdata/list/{coins}/{period}
Get OHLC data for a list of coins for one particular period of time.
The result is returned in form of record, where coin names are keys and arrays of OHLC data are values.
Example:
{
"cardano": [[1759323600000, 0.835945, 0.835945, 0.834412, 0.834412]]
}