v1

latestOpenAPI 3.0.02026-08-04134348905.1 KB
Trading

List trades

Permissions required: Execute trades or Read trade activity

List all trades. With the permission Read trade activity all trades of the organization may be read. With the permission Execute trades only the trades created by this API key may be read.

Trades are sorted in a descending order by their timestamp, i.e. the most recent trade or the trade with a timestamp closest to endDate is listed first.

Filters

You may optionally supply the following filters:

  • Specify a tradingPair to filter by the trading pair of the trade, for example BTC-USD.
  • Specify one or multiple status to filter trades. Multiple statuses should be separated by commas.
  • Specify a side to filter by the side of the trade.
get/trading/trades

Query parameters

startDatestring date

The start date of the trades (inclusive) in YYYY-MM-DD format. The earliest valid start date is 2017-01-01. The last valid start date is the current date. A startDate of '2021-01-10' is equivalent to a startDateTime of '2021-01-10.00:00:00.000000000'. Dates are always in UTC RFC 3339 'full-date'.

endDatestring date

The end date of the trades (exclusive) in YYYY-MM-DD format. The latest valid end date is the current date. If not provided, defaults to the most recently closed day. An endDate of '2021-01-10' is equivalent to an endDateTime of '2021-01-10.00:00:00.000000000'. Dates are always in UTC RFC 3339 'full-date'.

startDateTimestring date-time

The start date-time of the trades (exclusive) in YYYY-MM-DDTHH:MM:SS.nnnnnnnnn format. The earliest valid start date-time is '2017-01-01T00:00:00.000000000'. The last valid start date-time is the current date-time. startDateTime will be used if both startDate and startDateTime are specified. Date-times are always in UTC RFC 3339 'date-time'.

endDateTimestring date-time

The end date-time of the trades (exclusive) in YYYY-MM-DDTHH:MM:SS.nnnnnnnnn format. The latest valid end date-time is the current date-time. The earliest valid end date-time is '2017-01-01T00:00:00.000000000'. endDateTime will be used if both endDate and endDateTime are specified. Date-times are always in UTC RFC 3339 'date-time'.

statusstring[]

One or more statuses to filter trades. If provided, only trades matching these statuses will be returned.

side'BUY' | 'SELL'

Filter by the side of a trade. If provided, only trades matching this side will be returned.

tradingPairstring

Filter by the trading pair of a trade. If provided, only trades matching this pair of assets will be returned.

accountIdstring

Filter by the trading account ID of a trade. If provided, only trades linked to this account ID will be returned.

subaccountIdstring

Filter by the trading account ID of a trade. If provided, only trades linked to this account ID will be returned.

orderIdstring

Filter by the order ID of a trade. The orderId is the anchorage orderId on execution report. If provided, only trades of the specified order will be returned.

vaultIdstring

Filter by the vault ID of a trade. If provided, only trades linked to this vault ID will be returned.

tradeIdsstring[]

A list of tradeIds to return. Invalid tradeIds will be ignored. A maximum number of unique 500 trade ids are enforced per call.

limitinteger

Maximum number of results to return per query

Response

A list of Trades and their metadata

Example response

{
  "data": [
    {
      "account": {
        "accountId": "6290d9bd-494f-11ed-975e-2e567b4c0e09",
        "subaccountId": "5490d9bd-494f-11ed-975e-2e567b4c0e09"
      },
      "side": "BUY",
      "vault": {
        "vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
      }
    }
  ],
  "page": {
    "next": "<next page url>"
  }
}