-
Notifications
You must be signed in to change notification settings - Fork 30
Market data API
Market data API is accessible through https and parameters are passed using GET-requests. All responses are encoded in JSON.
Currently the market APIs are cached for 1 second (Except trades which is cached for 2 seconds).
path: /market/BTC/AUD/tick
sample response:
{"bestBid":13837.64,"bestAsk":13865.91,"lastPrice":13865.91,"currency":"AUD","instrument":"BTC","timestamp":1563999153,"volume24h":202.73146,"price24h":-728.71,"low24h":13692.44,"high24h":14594.62}
path: /market/BTC/AUD/orderbook
sample response:
{"currency":"AUD","instrument":"BTC","timestamp":1476243360,"asks":[[844.98,0.45077821],[845.0,2.7069457],[848.68,2.58512],[848.76,0.29745]],"bids":[[844.0,0.00489636],[840.21,0.060724],[840.16,0.1180803],[840.1,0.32130103]]}
path: /market/BTC/AUD/trades
sample response:
[{"tid":4432702312,"amount":0.01959674,"price":845.0,"date":1378878093},{"tid":59861212129,"amount":1.21434000,"price":845.15,"date":1377840783}]
since
is an optional parameter for trades (get trades since the trade id). For instance:
/market/BTC/AUD/trades?since=59868345231
path: /v2/market/active
sample response:
{
"success": true,
"errorCode": null,
"errorMessage": null,
"markets": [
{
"instrument": "BTC",
"currency": "AUD"
},
{
"instrument": "LTC",
"currency": "AUD"
},
{
"instrument": "LTC",
"currency": "BTC"
},
{
"instrument": "ETH",
"currency": "BTC"
},
{
"instrument": "ETH",
"currency": "AUD"
},
{
"instrument": "XRP",
"currency": "AUD"
},
{
"instrument": "XRP",
"currency": "BTC"
},
{
"instrument": "POWR",
"currency": "AUD"
},
{
"instrument": "POWR",
"currency": "BTC"
},
{
"instrument": "OMG",
"currency": "AUD"
},
{
"instrument": "OMG",
"currency": "BTC"
}
]
}
path: /v2/market/{instrument}/{currency}/trades
url parameters:
-
indexForward
: Set totrue
to see trades more recent in time, if asince
parameter is used. Default isfalse
. -
limit
: Number of results to return per "page". If not provided, default is 200. -
since
: a trade id. If provided, andindexForward
isfalse
, returned results will be trades earlier than the trade id provided, non-inclusive. IfindexForward
istrue
, returned results will be trades after the trade id provided, non-inclusive.
pagination: yes
sample request: /v2/market/BTC/AUD/trades?limit=&since=116082008
sample response:
{
"success": true,
"errorCode": null,
"errorMessage": null,
"trades": [
{
"id": 116082007,
"price": 88118000000,
"volume": 1189817,
"creationTime": 1468115880783
},
{
"id": 116075304,
"price": 87100000000,
"volume": 100000,
"creationTime": 1468114578646
},
{
"id": 116074896,
"price": 88374000000,
"volume": 220427,
"creationTime": 1468114492317
},
{
"id": 116058580,
"price": 88142000000,
"volume": 962049,
"creationTime": 1468111460168
},
{
"id": 116053310,
"price": 88266000000,
"volume": 15328802,
"creationTime": 1468110652290
}
],
"paging": {
"newer": "/v2/market/BTC/AUD/trades?limit=5&since=116082007&indexForward=true",
"older": "/v2/market/BTC/AUD/trades?limit=5&since=116053310&indexForward=false"
}
}
path: /v2/market/{instrument}/{currency}/tickByTime/{[minute | hour | day]}
url parameters:
-
limit
: Number of results to return per "page". If not provided, default is 3000. -
since
: a unix timestamp in milliseconds. If provided, andindexForward
isfalse
, returned results will be candles earlier than the timestamp provided, inclusive. IfindexForward
istrue
, returned results will be candles after the timestamp provided, inclusive. -
indexForward
: Set totrue
to see candles more recent than the timestamp in thesince
parameter, if asince
parameter is used. Default isfalse
. -
sortForward
: Set totrue
to see the earliest candles first in the list of returned candles i.e. in chronological order. Default isfalse
.
pagination: yes
sample request: /v2/market/BTC/AUD/tickByTime/hour?since=1537671600000&limit=4&indexForward=true&sortForward=true
sample response:
{
"success": true,
"paging": {
"newer": "/v2/market/BTC/AUD/tickByTime/hour?limit=4&sortForward=true&indexForward=true&since=1537682400000",
"older": "/v2/market/BTC/AUD/tickByTime/hour?limit=4&sortForward=true&since=1537671600000"
},
"ticks": [
{
"timestamp": 1537671600000,
"open": 908800000000,
"high": 909771000000,
"low": 906053000000,
"close": 906935000000,
"volume": 1113664994
},
{
"timestamp": 1537675200000,
"open": 908506000000,
"high": 909770000000,
"low": 906936000000,
"close": 909184000000,
"volume": 929443810
},
{
"timestamp": 1537678800000,
"open": 909187000000,
"high": 909600000000,
"low": 909187000000,
"close": 909596000000,
"volume": 215936611
},
{
"timestamp": 1537682400000,
"open": 909596000000,
"high": 909616000000,
"low": 907175000000,
"close": 907175000000,
"volume": 388776816
}
]
}
Introduction updated 9/28/18
WebSocket v1 deprecated
Market Data API updated 7/24/19
Trading API updated 08/19/19
Account API updated 3/14/19
Fund Transfer API updated 08/06/19