Skip to main content

Orderbook

Orderbook data stream.

Connect

websocat wss://api.datamaxiplus.com/ws/v1/orderbook -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 symbol@exchange (e.g. "BTC-KRW@upbit"). You can request the list of supported exchanges with /api/v1/orderbook/exchanges symbols with /api/v1/orderbook/symbols endpoint.
  • The id uniquely identifies the subscription request.
{
"method": "SUBSCRIBE",
"params": [
string
],
"id": int32
}

Response

  • e represents the exchange name.
  • d represents the date and the time in UTC milliseconds.
  • s represents the symbol (base-quote).
  • b represents the base token.
  • q represents the quote token.
  • as represents the list of ask orders.
    • Each ask order contains:
      • P represents the price at which the order is placed.
      • v represents the volume or quantity of the order.
  • bs represents the list of bid orders.
    • Each bid order contains:
      • P represents the price at which the order is placed.
      • v represents the volume or quantity of the order.
{
"e": string,
"d": int,
"s": string,
"b": string,
"q": string,
"as": [
{
"P": float,
"v": float
}
],
"bs": [
{
"P": float,
"v": float
}
]
}