Skip to main content
GET
Get order stats

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

account_id
string<uuid>

Trading account ID

environment
enum<string>
required

Required. Which environment the read covers. Resolved to the organization's accounts in that environment, including disabled and deleted ones, since the ledger stores no environment of its own. Rejected with 400 when it disagrees with the account named alongside it.

Available options:
paper,
live
days
integer<int64>
required

Trailing days, clamped to 1 through 90, then to the window the caller's plan grants

Response

Order stats retrieved

cancelled_count
integer<int64>
required
Required range: x >= 0
closed_count
integer<int64>
required
Required range: x >= 0
data
object[]
required

The same counts broken down over the lookback window, oldest bucket first.

Every bucket in the window is present even when nothing happened in it, so the series can be plotted without the caller filling gaps. The top-level counts are the sum of the buckets.

filled_count
integer<int64>
required
Required range: x >= 0
order_count
integer<int64>
required
Required range: x >= 0
previous
object
required

The same totals for the window of equal length immediately before this one: the 24 hours before the reported 24, the 7 days before the reported 7.

This is the baseline a period-over-period change is measured against. Deriving one from data alone would only ever compare the window against itself, which reports a lull in the second half as a fall even when the window matches the one before it.

rejected_count
integer<int64>
required
Required range: x >= 0