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
trade: Transaction
O
codesListMarket code list
*Must be requested in capital letters.
O
isOnlySnapshotBooleanOnly provides snapshot dataXfalse
isOnlyRealtimeBooleanOnly provides real-time dataXfalse

Response

Field Name
Simplified Format (format: SIMPLE)
Description
TypeValue
typetyTypeStringtrade
codecdMarket code (ex. SDG-BTC)String
trade_pricetpTrade priceDouble
trade_volumetvTrade volumeDouble
ask_bidabOrder typeStringASK

BID
prev_closing_pricepcpPrevious closing priceDouble
changecChange price type compared to the previous day's closing priceStringRISE

EVEN

FALL
change_pricecpUnsigned change price compared to the previous day's closing priceDouble
trade_datetdTrade date (UTC)Stringyyyy-MM-dd
trade_timettmTrade time (UTC)StringHH:mm:ss
trade_timestampttmsTrade timestamp (millisecond)Long
timestamptmsTimestamp (millisecond)Long
sequential_idsidTrade sequential ID (Unique)Long
stream_typestStream typeStringSNAPSHOT

REALTIME

*The sequential_id field can be used as the basis for assessing the uniqueness of a trade. However, this does not guarantee trade order.

Example

Request

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

Response

{
  "type": "trade",
  "code": "SGD-BTC",
  "timestamp": 1696585056910,
  "trade_date": "2023-10-06",
  "trade_time": "09:37:36",
  "trade_timestamp": 1696585056846,
  "trade_price": 37625,
  "trade_volume": 8.428e-05,
  "ask_bid": "ASK",
  "prev_closing_price": 37296,
  "change": "RISE",
  "change_price": 329,
  "sequential_id": 1696585056846000,
  "stream_type": "SNAPSHOT"
}
...
{
  "type": "trade",
  "code": "SGD-ETH",
  "timestamp": 1696585254027,
  "trade_date": "2023-10-06",
  "trade_time": "09:40:53",
  "trade_timestamp": 1696585253974,
  "trade_price": 2224,
  "trade_volume": 0.00210894,
  "ask_bid": "ASK",
  "prev_closing_price": 2192,
  "change": "RISE",
  "change_price": 32,
  "sequential_id": 1696585253974000,
  "stream_type": "REALTIME"
}