Skip to main content
GET
Python (SDK)

Prerequisites

You must pass from (RFC 3339 with timezone). If you omit to, the service uses the current time truncated to the minute (UTC) and caps the span at 90 days from from.

Pagination and sorting

Use the same cursor / nextCursor contract as List active orders (v2): start with cursor=0, then pass the last nextCursor until it returns 0. Sorting is by order_created_at; set order_by to asc or desc (default desc).

Response envelope

Same contract as List active orders (v2): orders (never null) and nextCursor are always present. Each order uses the v2 domain shape with the same required core fields (clOrdId, accountId, symbol, decimal quantity/price strings, timestamps). History excludes SUPERSEDED status and rows with failed_flag = true server-side.

Demo response

Each order matches the v2 domain shape so it aligns with WebSocket and cache-backed reads.

Authorizations

Authorization
string
header
required

OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.

Path Parameters

id
string
required

Account ID whose historical orders you want to read.

Query Parameters

from
string<date-time>
required

Start of the history window, inclusive. Enter an RFC 3339 timestamp with timezone, for example 2026-04-01T00:00:00Z.

to
string<date-time>

End of the history window, inclusive. Omit it to use the current time. The total range from from cannot exceed 90 days.

order_by
enum<string>
default:desc

Sort direction by order_created_at. Defaults to desc (newest first). Use asc for chronological exports.

Available options:
asc,
desc
exclude_today
boolean
default:false

Set to true when you want historical orders only and do not want today's activity duplicated with the active-orders endpoint.

limit
integer
default:50

Maximum number of historical orders to return in this page. Default is 50; maximum is 500.

Required range: 1 <= x <= 500
cursor
integer<int64>
default:0

Opaque pagination cursor for the database history walk. Send 0 (or omit) for the first page; pass the previous nextCursor until it is absent.

Response

Page of historical orders

Paginated v2 orders response from GET /v2/accounts/{id}/orders and GET /v2/accounts/{id}/orders/history. orders is always present; nextCursor is present only when another page exists.

orders
object[] | null
required

Page of orders in v2 domain shape (TradeOrderV2). null from GET /v2/accounts/{id}/orders when the account has no active orders; an empty array from the history endpoint when there are no matches.

nextCursor
integer<int64>

Opaque pagination cursor. Pass as cursor on the next request. This field is omitted on the final page.