🚧

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
typeStringData type
candle.1s: 1s candle
O
codesListMarket code list
*Must be requested in capital letters.
O
is_only_snapshotBooleanOnly provides snapshot dataXfalse
is_only_realtimeBooleanOnly provides real-time dataXfalse

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
TypeValue
typetyTypeStringorderbook
codecdMarket code (ex. SDG-BTC)String
candle_date_time_utccdttmuCandle time (UTC)
format: yyyy-MM-dd'T'HH:mm:ss
Double
opening_priceopOpen priceDouble
high_pricehpHigh priceList of Objects
low_pricelpLow priceDouble
trade_pricetpClose priceDouble
candle_acc_trade_volumecatvAccumulated trade price for the candleDouble
candle_acc_trade_pricecatpAccumulated trade quantity for the candleDouble
timestamptmsTimestamp (millisecond)Long
stream_typestStream TypeStringSNAPSHOT
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"
}