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
method
specifies the type of request.params
list 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
id
uniquely identifies the subscription request.
- schema
- example
{
"method": "SUBSCRIBE",
"params": [
string
],
"id": int32
}
{
"method": "SUBSCRIBE",
"params": [
"BTC-KRW@upbit@USD@USDT"
],
"id": 1
}
Response
Field (JSON key) | Description |
---|---|
p | MidPrice — Latest price. Example: 43000 |
v | Volume — Trading volume in the last 24 hours. Example: 1000 |
p24h | Price24hAgo — Price 24 hours ago. Example: 42000 |
pc | PriceChange — Price change between latest price and price 24 hours ago. Example: 0.0238 |
hb | HighestBid — Highest bid from orderbook. Example: 41900 |
la | LowestAsk — Lowest ask from orderbook. Example: 42100 |
ud | BidDepth2p — Upper depth (2%) from orderbook. Example: 1000 |
ld | AskDepth2p — Lower depth (2%) from orderbook. Example: 1000 |
e | Exchange — Exchange name. Example: binance |
s | Symbol — Symbol (base-quote). Example: BTC-USDT |
b | Base — Base token. Example: BTC |
q | Quote — Quote token. Example: USDT |
d | Timestamp — Date/time in UTC milliseconds. Example: 1632960000000 |
m | Market — Market type. Example: spot |
- schema
- example
{
"p": float, // Latest price
"v": float, // Trading volume in the last 24 hours
"p24h": float, // Price 24 hours ago
"pc": float, // Price change between latest price and price 24 hours ago
"hb": float, // Highest bid from orderbook
"la": float, // Lowest ask from orderbook
"ud": float, // Upper depth (2%) from orderbook
"ld": float, // Lower depth (2%) from orderbook
"e": string, // Exchange name
"s": string, // Symbol (base-quote)
"b": string, // Base token
"q": string, // Quote token
"d": int, // Timestamp in UTC milliseconds
"m": string // 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"
}