History

private/get_trade_history

Changed on

Returns a paginated history of executed trades for a single subaccount or an entire wallet (specify exactly one), with optional filters for a time window, order id, instrument name, or quote id. The response includes the trade records and pagination info with total count and page count.

post/private/get_trade_history

Request

  • Base URL
    https://api.derive.xyz/v3
  • Auth
    API key in header X-DeriveWallet and API key in header X-DeriveTimestamp and API key in header X-DeriveSignature

Request body

GetTradeHistoryRequest required
from_timestamp, integer nullable
instrument_name, string nullable
order_id, string nullable
page, integer nullable
page_size, integer nullable
quote_id, string nullable
subaccount_id, integer nullable
to_timestamp, integer nullable
wallet, string nullable

Response

Success

PaginatedTradesResult required
pagination, Pagination required

Response envelope for paginated RPCs.

subaccount_id, integer required
trades, TradeHistoryResponse[] required

Changes

    • info

      added the required property trades/items/block_trade_id to the response with the status

    • info

      the endpoint scheme security DeriveWallet AND DeriveTimestamp AND DeriveSignature was added to the API

    • info

      added the media type application/json for the response with the status