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 |
---|---|---|---|---|
type | String | data type - orderbook : Orderbooks | O | |
codes | List | Market code list *Must be requested in capital letters. | O | |
is_only_snapshot | Boolean | Only provides snapshot data | X | false |
is_only_realtime | Boolean | Only provides real-time data | X | false |
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 | Type | Value |
---|---|---|---|---|
type | ty | Type | String | orderbook |
code | cd | Market code (ex. SDG-BTC) | String | |
total_ask_size | tas | Total remaining volume of asking orders | Double | |
total_bid_size | tbs | Total remaining volume of bidding orders | Double | |
orderbook_units | obu | Order book details | List of Objects | |
ask_price | ap | Ask price | Double | |
bid_price | bp | Bid price | Double | |
ask_size | as | Remaining volume of asking | Double | |
bid_size | bs | Remaining volume of bidding | Double | |
timestamp | tms | Timestamp (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"
}
...