Orderbook

Request

The requests is consisted of JSON Object and the response is also JSON Object. Requests are divided into ticket field, type field, and format field, and multiple type fields can be specified in one request. Please refer to Request method and format for ticket field and format field.

📘

Request format

[{Ticket Field}, {Type Field},....,{Type Field}, {Format Field}]

Type Field

In this field, you have to list the market data you want to receive.

"is_only_snapshot" and "is_only_realtime" fields are optional and both snapshot and real-time data will be received if they are omitted.

Field Name
Type
Description
Required
Default
typeStringdata type
- orderbook: Orderbooks
O
codesListMarket code list
*Must be requested in capital letters.
O
is_only_snapshotBooleanOnly provides snapshot dataXfalse
is_only_realtimeBooleanOnly provides real-time dataXfalse

📘

Custom function for Orderbook Unit quantity is added from v1.1.0

From v1.1.0, you can adjust the quantity of Orderbook Units within the maximum provided amount (30) only for orderbook type packets.

Please input the market code and unit quantity in the codes as follows.

Format: {code}.{count}
ex) "SGD-BTC.5", "SGD-ETH.3"


Example

Request

[
  {
    "ticket": "test example"
  },
  {
    "type": "orderbook",
    "codes": [
      "SGD-BTC",
      "SGD-ETH"
    ]
  },
  {
    "format": "DEFAULT"
  }
]

Response

{
  "type": "orderbook",
  "code": "SGD-BTC",
  "timestamp": 1746602359173,
  "total_ask_size": 0.68780013,
  "total_bid_size": 0.78754733,
  "orderbook_units": [
    {
      "ask_price": 125056.0,
      "bid_price": 124743.0,
      "ask_size": 0.17,
      "bid_size": 0.17
    },
    {
      "ask_price": 125207.0,
      "bid_price": 124332.0,
      "ask_size": 0.09,
      "bid_size": 0.09
    },
    {
      "ask_price": 125416.0,
      "bid_price": 124167.0,
      "ask_size": 0.2,
      "bid_size": 0.2
    },
    {
      "ask_price": 126661.0,
      "bid_price": 122917.0,
      "ask_size": 0.01210697,
      "bid_size": 0.01844114
    }
    // ...more units omitted for brevity
  ],
  "stream_type": "SNAPSHOT"
}