v1

latestOpenAPI 3.1.02026-07-241653251.3 MB
CLOB

Get trade stats

Get trade stats for a given instrument.

post/orders/v1/get_trade_stats

Headers

X-SCX-SIGNEDstring required

HMAC-SHA256 signature of the request, base64-encoded. See the Authentication guide for the exact signing formula.

X-SCX-TIMESTAMPstring required
Example:1678901234

Current Unix timestamp in seconds. Must be within 60 seconds of server time or the request is rejected.

Request body

barsnumber

The number of bars to return in the given time window

end_timestring

The end time of the time window

start_timestring

The start time of the time window

symbolstring

The symbol for the instrument

Example request

{
  "end_time": "2024-04-19T22:48:56.383Z",
  "start_time": "2024-04-19T22:48:56.383Z",
  "symbol": "BTC/USD"
}

Response

A successful response

bar_end_timestring[]
bar_start_timestring[]

Example response

{
  "bar_end_time": [
    "2024-04-19T22:48:56.387Z"
  ],
  "bar_start_time": [
    "2024-04-19T22:48:56.387Z"
  ],
  "bars": [
    {
      "cleared_notional": "string",
      "cleared_trade_count": "string",
      "cleared_volume": "string",
      "first": "string",
      "high": "string",
      "last": "string",
      "low": "string",
      "notional": "string",
      "total_trade_count": "string",
      "volume": "string"
    }
  ],
  "stats": {
    "cleared_notional": "100000",
    "cleared_trade_count": "500",
    "cleared_volume": "2001020",
    "first": "100000",
    "high": "150000",
    "last": "120000",
    "low": "100002",
    "notional": "10000",
    "total_trade_count": "500",
    "volume": "200000"
  }
}