Get trades
Historical fills for an account and/or instrument — time-range mode or cursor-based latest trades pagination.
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| account | yes | string (hex) | Account address (hex-encoded, 0x...). Required if instrument is not provided. |
| instrument | yes | string (decimal) | Instrument id (hex string, 0x...). Required if account is not provided. |
| startTime | yes | integer (int64) | Start timestamp in milliseconds (optional, defaults to 24h ago). |
| endTime | yes | integer (int64) | End timestamp in milliseconds (optional, defaults to now). |
| limit | yes | integer | null |
| count | yes | integer | null |
| cursor | yes | string | null |
Response fields
| Parameter | Required | Type | Description |
|---|---|---|---|
count | no | integer | null | Number of trades requested per page when count pagination mode is used. |
nextCursor | no | string | null | Cursor for the next page when count pagination mode is used. |
trades | yes | object[] | Fill events for the requested account and/or instrument. |
trades[].account | yes | string (hex) | An Ethereum-style account address (20 bytes). |
trades[].eventIndex | yes | integer (int32) | — |
trades[].feeAmount | yes | string | — |
trades[].feeRate | yes | string | — |
trades[].instrument | yes | string (decimal) | An instrument identifier (8-byte hash). |
trades[].isAdl | yes | boolean | — |
trades[].isLiquidation | yes | boolean | — |
trades[].isPassive | yes | boolean | — |
trades[].orderId | yes | integer (int64) | — |
trades[].pnl | yes | string | — |
trades[].price | yes | string | — |
trades[].round | yes | integer (int64) | — |
trades[].settlementAsset | yes | integer | — |
trades[].size | yes | string | — |
trades[].ticker | yes | string | Canonical instrument ticker from the indexed instruments table (empty if unknown). |
trades[].timestamp | yes | integer (int64) | — |
trades[].txIndex | yes | integer (int32) | — |
Response example
A sample 200 response body is attached to this operation as an OpenAPI example — see the Example panel on this page.
Path Parameters
Account address (hex-encoded, 0x...). Required if instrument is not provided.
Instrument id (hex string, 0x...). Required if account is not provided.
An instrument identifier (8-byte hash).
"42"
Start timestamp in milliseconds (optional, defaults to 24h ago).
x >= 0End timestamp in milliseconds (optional, defaults to now).
x >= 0Maximum number of trades to return (optional, defaults to 500, max 1000).
x >= 0Alternative to startTime/endTime: number of latest trades per page (max 100).
0 <= x <= 100Opaque cursor returned by the previous count mode response.
Response
Trades
Fill events for the requested account and/or instrument.
Number of trades requested per page when count pagination mode is used.
x >= 050
Cursor for the next page when count pagination mode is used.
"eyJ0aW1lc3RhbXAiOjE3NzQzNjgxMDc1OTAsInJvdW5kIjoyOTA4MzQwMSwidHhJbmRleCI6MCwiZXZlbnRJbmRleCI6MCwiZXZlbnRJZCI6IjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAifQ"