본문으로 건너뛰기

Ticker

Ticker data stream.

Connect

# 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'

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").
  • The id uniquely identifies the subscription request.
{
"method": "SUBSCRIBE",
"params": [
string
],
"id": int32
}

Response

Field (JSON key)Description
pMidPrice — Latest price.
Example: 43000
vVolume — Trading volume in the last 24 hours.
Example: 1000
p24hPrice24hAgo — Price 24 hours ago.
Example: 42000
pcPriceChange — Price change between latest price and price 24 hours ago.
Example: 0.0238
hbHighestBid — Highest bid from orderbook.
Example: 41900
laLowestAsk — Lowest ask from orderbook.
Example: 42100
udBidDepth2p — Upper depth (2%) from orderbook.
Example: 1000
ldAskDepth2p — Lower depth (2%) from orderbook.
Example: 1000
eExchange — Exchange name.
Example: binance
sSymbol — Symbol (base-quote).
Example: BTC-USDT
bBase — Base token.
Example: BTC
qQuote — Quote token.
Example: USDT
dTimestamp — Date/time in UTC milliseconds.
Example: 1632960000000
mMarket — Market type.
Example: spot
{
"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
}