Endpoints
Position Data
Each position includes:Balance Data
Account balances include:Historical Position Queries
Query positions as they existed at a specific point in time. Useful for regulatory reporting, reconciliation, or end-of-day snapshots.Parameters
Examples
Query by timestamp (exact point in time):Use Cases
- End-of-Day Reports: Query positions at market close for daily P&L calculations
- Regulatory Snapshots: Capture position state at specific regulatory timestamps
- Reconciliation: Compare historical positions against external records
- Audit Trail: Review position history for compliance or dispute resolution
Usage Notes
Position Updates After TradesPosition data is updated after each trade execution. For real-time trade notifications that affect positions, use the gRPC Order Stream.
- Positions are aggregated by symbol and account
- Balances reflect current available and reserved amounts
- Use the Order Stream for real-time execution updates that affect positions
- Historical queries return the position state as of the specified time
Position Ledger
The position ledger records every change to a position as a single entry, with both the delta (quantityChange, costChange, realizedChange) and the cumulative state immediately after the change (netPosition, cost, realized). Use it for reconciliation, point-in-time replay, and end-of-day reporting.
Ledger Endpoints
Both endpoints are scoped under
read:positions (the same scope used for GetAccountBalance, ListAccountBalances, and the position queries on this section). Calls without read:positions fail with 403 Forbidden (REST) / PERMISSION_DENIED (gRPC).Historical Floor
The ledger has a hard historical floor of May 1, 2026 (UTC). Enforcement is defense-in-depth:
start_timeis clamped upstream to the floor when the caller asks for earlier data.- Entries with
update_timebefore the floor are post-filtered from responses.
Delta Computation
Each ledger entry is computed from the exchange’s before/after position snapshots:netPosition, cost, realized) on each entry are the state immediately after the change. To reconstruct point-in-time position state, replay entries in update_time order.
Cross-Firm Access
The account inaccount=firms/{firm}/accounts/{id} must belong to the caller’s firm (extracted from the JWT firm_id claim). Cross-firm access is blocked at the gateway:
Get Position Ledger
Query Parameters
Sample Response
PositionLedgerEntry Fields
int64 fields are serialized as strings in JSON (e.g.,
"50" not 50) per the protobuf JSON mapping spec. Parse them as strings to avoid precision loss in languages with 53-bit integer limits.Response Wrapper Fields
Download Position Ledger
GET /v1/positions/ledger (account, symbol, start_time, end_time, page_size, page_token, newest_first).
It streams raw CSV bytes from the upstream ledger as a passthrough; the gateway does not parse individual rows.
Empty result sets return a single empty chunk followed by EOF (HTTP 200 with an empty body). The gateway translates an upstream “stream returned a nil response” condition into an empty result.
Ledger Rate Limits (per firm)
Exceeding these limits returns
ResourceExhausted (429 Too Many Requests).
Ledger Error Codes
See Also
Balance Ledger
Cash balance changes (deposits, withdrawals, fills, fees)
Balance Ledger Stream
Real-time balance ledger via gRPC
Order Stream
Real-time execution updates that affect positions
Authentication
Required scopes and OAuth flow