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.

"isOnlySnapshot" and "isOnlyRealtime" 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
isOnlySnapshotBooleanOnly provides snapshot dataXfalse
isOnlyRealtimeBooleanOnly 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 (15) 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"

Response

Field Name
Simplified Format (format: SIMPLE)
Description
TypeValue
typetyTypeStringorderbook
codecdMarket code (ex. SDG-BTC)String
total_ask_sizetasTotal remaining volume of asking ordersDouble
total_bid_sizetbsTotal remaining volume of bidding ordersDouble
orderbook_unitsobuOrder book detailsList of Objects
ask_priceapAsk priceDouble
bid_pricebpBid priceDouble
ask_sizeasRemaining volume of askingDouble
bid_sizebsRemaining volume of biddingDouble
timestamptmsTimestamp (millisecond)Long

Example

Request

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

Response

{
  "type": "orderbook",
  "code": "SGD-BTC",
  "timestamp": 1693384093338,
  "total_ask_size": 1.115048,
  "total_bid_size": 2.22592683,
  "orderbook_units": [
    {
      "ask_price": 37309,
      "bid_price": 36951,
      "ask_size": 0.09979228,
      "bid_size": 0.19131158
    },
    {
      "ask_price": 37398,
      "bid_price": 36937,
      "ask_size": 0.09464536,
      "bid_size": 0.19275231
    },
    {
      "ask_price": 37489,
      "bid_price": 36925,
      "ask_size": 0.11015019,
      "bid_size": 0.00163167
    },
    {
      "ask_price": 37589,
      "bid_price": 36891,
      "ask_size": 0.10465524,
      "bid_size": 0.17920444
    },
    {
      "ask_price": 37693,
      "bid_price": 36796,
      "ask_size": 0.10094518,
      "bid_size": 0.20692374
    },
    {
      "ask_price": 37758,
      "bid_price": 36714,
      "ask_size": 0.09545604,
      "bid_size": 0.20008857
    },
    {
      "ask_price": 37852,
      "bid_price": 36617,
      "ask_size": 0.06839442,
      "bid_size": 0.19236415
    },
    {
      "ask_price": 37892,
      "bid_price": 36548,
      "ask_size": 0.06563822,
      "bid_size": 0.1826374
    },
    {
      "ask_price": 37961,
      "bid_price": 36533,
      "ask_size": 0.06265596,
      "bid_size": 0.18704693
    },
    {
      "ask_price": 38028,
      "bid_price": 36504,
      "ask_size": 0.05943961,
      "bid_size": 0.13372202
    },
    {
      "ask_price": 38107,
      "bid_price": 36408,
      "ask_size": 0.05598151,
      "bid_size": 0.12398731
    },
    {
      "ask_price": 38163,
      "bid_price": 36308,
      "ask_size": 0.05266928,
      "bid_size": 0.11447087
    },
    {
      "ask_price": 38257,
      "bid_price": 36246,
      "ask_size": 0.05107561,
      "bid_size": 0.11360791
    },
    {
      "ask_price": 38326,
      "bid_price": 36189,
      "ask_size": 0.04724477,
      "bid_size": 0.10775916
    },
    {
      "ask_price": 38370,
      "bid_price": 36109,
      "ask_size": 0.04630433,
      "bid_size": 0.09841877
    }
  ],
  "stream_type": "SNAPSHOT"
}
...