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 typeticker : Current market price | 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 |
Response
Field Name | Simplified Format (format: SIMPLE) | Description | Type | Value |
---|---|---|---|---|
type | ty | Type | String | ticker |
code | cd | Market ID (e.g. SGD-BTC) | String | |
opening_price | op | Opening price | Double | |
high_price | hp | High price | Double | |
low_price | lp | Low price | Double | |
trade_price | tp | Closing price | Double | |
prev_closing_price | pcp | Previous close | Double | |
change | c | Change direction | String | RISE , EVEN , FALL |
change_price | cp | Unsigned change price | Double | |
signed_change_price | scp | Signed change price | Double | |
change_rate | cr | Unsigned change rate | Double | |
signed_change_rate | scr | Signed change rate | Double | |
trade_volume | tv | Last trade volume | Double | |
acc_trade_volume | atv | Accumulated volume (UTC+0) | Double | |
acc_trade_volume_24h | atv24h | 24h accumulated volume | Double | |
acc_trade_price | atp | Accumulated price (UTC+0) | Double | |
acc_trade_price_24h | atp24h | 24h accumulated price | Double | |
trade_date | tdt | Trade date (UTC) | String | yyyyMMdd |
trade_time | ttm | Trade time (UTC) | String | HHmmss |
trade_timestamp | ttms | Trade timestamp (ms) | Long | |
ask_bid | ab | Order type | String | ASK , BID |
acc_ask_volume | aav | Accumulated ask volume | Double | |
acc_bid_volume | abv | Accumulated bid volume | Double | |
highest_52_week_price | h52wp | 52-week high price | Double | |
highest_52_week_date | h52wdt | Date of 52-week high | String | yyyy-MM-dd |
lowest_52_week_price | l52wp | 52-week low price | Double | |
lowest_52_week_date | l52wdt | Date of 52-week low | String | yyyy-MM-dd |
market_state | ms | Market status | String | PREVIEW , ACTIVE , DELISTED |
market_warning | mw | Investment caution flag | String | NONE , CAUTION |
timestamp | tms | Data timestamp | Long | |
stream_type | st | Stream type | String | SNAPSHOT , REALTIME |
Example
Request
[
{
"ticket": "test example"
},
{
"type": "ticker",
"codes": ["SGD-BTC", "SGD-ETH"]
},
{
"format": "DEFAULT"
}
]
Response
{
"type": "ticker",
"code": "SGD-BTC",
"opening_price": 37249,
"high_price": 37645,
"low_price": 36732,
"trade_price": 36929,
"prev_closing_price": 37235,
"acc_trade_price": 5530.55648491,
"change": "FALL",
"change_price": 306,
"signed_change_price": -306,
"change_rate": 0.0082180744,
"signed_change_rate": -0.0082180744,
"ask_bid": "ASK",
"trade_volume": 0.00006314,
"acc_trade_volume": 0.149474,
"trade_date": "20230830",
"trade_time": "082105",
"trade_timestamp": 1693383665811,
"acc_ask_volume": 0.0197006,
"acc_bid_volume": 0.1297734,
"highest_52_week_price": 42710,
"highest_52_week_date": "2023-07-06",
"lowest_52_week_price": 21332,
"lowest_52_week_date": "2022-11-21",
"market_state": "ACTIVE",
"is_trading_suspended": false,
"delisting_date": null,
"market_warning": "NONE",
"timestamp": 1693383690031,
"acc_trade_price_24h": 8320.40577449,
"acc_trade_volume_24h": 0.22569412,
"stream_type": "SNAPSHOT"
}