Skip to main content

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:

FieldDescription
1stUNIX time the data belongs to.
2ndOpen price.
3rdHigh price.
4thLow price.
5thClose 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

FieldTypeDescription
lastUpdatenumber / nullTime of last update.
dataarrayArray of objects with metadata about OHLC info of coins.
servicestringService to which the data belongs.

Data entry fields

FieldTypeDescription
coinstringOne of the allowed coins.
periodstringOne of the allowed periods.
lengthnumberAmount 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]]
}