Ticker
Ticker data stream.
Connect
- websocat
- wscat
# spot market
websocat wss://api.datamaxiplus.com/ws/v1/ticker/spot -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
# futures market
websocat wss://api.datamaxiplus.com/ws/v1/ticker/futures -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
# spot market
wscat -c wss://api.datamaxiplus.com/ws/v1/ticker/spot -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
# futures market
wscat -c wss://api.datamaxiplus.com/ws/v1/ticker/futures -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
Subscribe
methodspecifies the type of request.paramslist represents of symbols on exchanges that user wants to subscribe. The format of parameter is{base}-{quote}@{exchange}@{currency}@{conversionBase}(e.g."BTC-KRW@upbit@USD@USDT").- You can request the list of supported exchanges with /api/v1/ticker/exchanges, symbols with /api/v1/ticker/symbols endpoint.
- Supported currency:
USD,KRW - Supported conversion base:
USDT,USD
- The
iduniquely identifies the subscription request.
- schema
- example
{
"method": "SUBSCRIBE",
"params": [
string
],
"id": int32
}
{
"method": "SUBSCRIBE",
"params": [
"BTC-KRW@upbit@USD@USDT"
],
"id": 1
}
Response
- Schema
- Example
Schema
pnumber
Latest price.
vnumber
Trading volume in the last 24 hours.
p24hnumber
Price 24 hours ago.
pcnumber
Price change between latest price and price 24 hours ago.
hbnumber
Highest bid from orderbook.
lanumber
Lowest ask from orderbook.
udnumber
Upper depth (2%) from orderbook.
ldnumber
Lower depth (2%) from orderbook.
estring
Exchange name.
sstring
Symbol (base-quote).
bstring
Base token.
qstring
Quote token.
dinteger
Date/time in UTC milliseconds.
mstring
Market type.
{
"p": 43000,
"v": 1000,
"p24h": 42000,
"pc": 0.0238,
"hb": 41900,
"la": 42100,
"ud": 1000,
"ld": 1000,
"e": "binance",
"s": "BTC-USDT",
"b": "BTC",
"q": "USDT",
"d": 1632960000000,
"m": "spot"
}