public/get_trade_history
Changed onReturns paginated, anonymized trades with optional filters: trade_id (a UUID, which overrides all other filters), instrument_name, instrument_type (erc20/option/perp), currency, subaccount_id, batch_status (a batch-status name; unset returns trades in every batch state), and from_timestamp/to_timestamp. Without trade_id, subaccount_id or instrument_name, or whenever batch_status is set, the window is limited to the 30 days ending at to_timestamp (or now). Each trade is enriched with its settlement status and transaction hash. A block trade does not show who traded it: wallet is the zero address, and subaccount_id, realized_pnl and realized_pnl_excl_fees are 0. The subaccount_id filter does not return block trades. Public endpoint.
Request
- Base URLhttps://api.derive.xyz/v3
- Authnone declared
Request body
Batch lifecycle status — the single source of lifecycle truth for every operation in the batch (individual ops carry no status of their own). Each stage has a healthy variant and a corresponding ...Error variant meaning that stage failed. Serialized as the variant name (string) in API responses.
Asset type of the instrument: "option", "perp", or "erc20".
Response
Success
Response envelope for paginated RPCs.
Changes
- info
added the required property
trades/items/block_trade_idto the response with the status
- info
- info
added the media type
application/jsonfor the response with the status
- info