History

private/get_order_history

Changed on

Returns a paginated history of orders for a single subaccount or for an entire wallet (specify exactly one), optionally bounded by a from/to timestamp window. Only orders in a terminal state (filled, cancelled, expired) are recorded here, one record per order. Trigger and algo orders appear once they terminate, carrying their accumulated filled amount; while they are still live — including partially executed algo orders and trigger orders that have not yet fired — read them from get_trigger_orders and get_algo_orders instead. Each page includes the order records plus pagination info with the total count and number of pages.

post/private/get_order_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

GetOrderHistoryRequest required
from_timestamp, integer nullable
page, integer nullable
page_size, integer nullable
subaccount_id, integer nullable
to_timestamp, integer nullable
wallet, string nullable

Response

Success

PaginatedOrdersResult required
orders, Order[] required
pagination, Pagination required

Response envelope for paginated RPCs.

subaccount_id, integer required

Changes

    • 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

    • warning

      added the new max_crossed_orders enum value to the orders/items/cancel_reason response property for the response status