v1

latestOpenAPI 3.1.02026-07-265385123.6 KB
TWAP

Get TWAP order history

Retrieve TWAP order history for a specific user including completed and cancelled orders. Returns historical TWAP orders sorted by most recent first. Supports filtering by timestamp range, sorting by timestamp, and pagination. Page size is capped at 200.

get/api/v1/twap_history

Query parameters

accountstring required

User account address (user query alias is also accepted)

limitinteger

Page size

offsetinteger

Page offset

start_timestampinteger

Start timestamp in Unix milliseconds (inclusive). Must be provided together with end_timestamp.

end_timestampinteger

End timestamp in Unix milliseconds (inclusive). Must be provided together with start_timestamp.

sort_key'timestamp'

Sort key for history endpoints

Sort key for history ordering. Defaults to timestamp when omitted.

sort_dir'ASC' | 'DESC'

Sort direction for history ordering. Defaults to DESC when omitted.

Response

TWAP history retrieved successfully

total_countinteger nullable

The total number of items across all pages. Optional: history endpoints omit this field to avoid expensive COUNT(*) queries.

Example response

{
  "items": [
    {
      "client_order_id": "client_order_123",
      "duration_s": 300,
      "frequency_s": 30,
      "is_buy": true,
      "market": "0xmarket123...",
      "start_unix_ms": 1730841600000
    }
  ]
}