This feature is currently available as a beta version.
Candles are only created when a trade occurs during the time frame.
- For example, the first candle with candle_date_time of 2024-08-31T22:25:00 consists of trades between 2024-08-31T22:25:00 (inclusive) and 2024-08-31T22:25:01 (exclusive).
- If there are no trades during the time frame, the 2024-08-31T22:25:00 candle is not created, and no data is sent to the websocket.
Request
Requests are JSON objects, and responses are also JSON objects. Requests are divided into ticket fields, type fields, and format fields. Multiple type fields can be specified in one request. Please refer to the Request method and format for the ticket and format fields.
Request format
[{Ticket Field},{Type Field},....,{Type Field},{Format Field}]
Type Field
In this field, you list the market data you want to receive.
The is_only_snapshot
and is_only_realtime
fields are optional. If omitted, both snapshot and real-time data will be received.
Field Name | Type | Description | Required | Default |
---|---|---|---|---|
type | String | Data type - candle.1s : 1s candle | 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
- Data transmission interval: 1 second.
The same candle_date_time data may be sent multiple times.
- The data transmission interval is not perfectly guaranteed, and candle data for the same period may be sent multiple times.
- The most recent data is always the latest update.
Field Name | Simplified Format (format: SIMPLE) | Description | Type | Value |
---|---|---|---|---|
type | ty | Type | String | orderbook |
code | cd | Market code (ex. SDG-BTC) | String | |
candle_date_time_utc | cdttmu | Candle time (UTC) format: yyyy-MM-dd'T'HH:mm:ss | Double | |
opening_price | op | Open price | Double | |
high_price | hp | High price | List of Objects | |
low_price | lp | Low price | Double | |
trade_price | tp | Close price | Double | |
candle_acc_trade_volume | catv | Accumulated trade price for the candle | Double | |
candle_acc_trade_price | catp | Accumulated trade quantity for the candle | Double | |
timestamp | tms | Timestamp (millisecond) | Long | |
stream_type | st | Stream Type | String | SNAPSHOT REALTIME |
Example
Request
[
{
"ticket": "test example"
},
{
"type": "candle.1s",
"codes": [
"SGD-BTC",
"SGD-ETH"
]
},
{
"format": "DEFAULT"
}
]
Response
{
"type": "candle.1s",
"code": "SGD-BTC",
"candle_date_time_utc": "2025-01-02T04:41:51",
"opening_price": 130155.0000000,
"high_price": 130155.0000000,
"low_price": 130155.0000000,
"trade_price": 130155.0000000,
"candle_acc_trade_volume": 0.00003473,
"candle_acc_trade_price": 4.520283150000000,
"timestamp": 1735792911165,
"stream_type": "REALTIME"
}
{
"type": "candle.1s",
"code": "SGD-ETH",
"candle_date_time_utc": "2025-01-02T04:42:59",
"opening_price": 4654.0000000,
"high_price": 4654.0000000,
"low_price": 4654.0000000,
"trade_price": 4654.0000000,
"candle_acc_trade_volume": 0.00086015,
"candle_acc_trade_price": 4.003138100000000,
"timestamp": 1735792979607,
"stream_type": "REALTIME"
}