Skip to main content

GET All Orders

Retrieve orders across all accounts in a single request. By default, only active (working) orders are returned. Pass ?activeOnly=false to include historical orders.

This is a convenience endpoint that eliminates the need to iterate through accounts individually when you need a cross-account view of order state.

Get all orders across all accounts

GET /v1/api/orders

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Query Parameters

NameTypeRequiredDescription
activeOnlybooleanOptionalFilter to only active (non-terminal) orders. Default: true
lookbackTimeintegerOptionalWhen activeOnly=false, limits historical orders to this many seconds in the past. Example: 86400 for the last 24 hours

Code Examples

import requests

token = 'my-secret-token'
url = "https://app.crosstrade.io/v1/api/orders"
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}

# Get all active orders across all accounts
params = {"activeOnly": "true"}

try:
response = requests.get(url, headers=headers, params=params)
print(f"Response Code: {response.status_code}, Response Text: {response.text}")
except Exception as e:
print(f"An error occurred: {e}")

Response

{
"orders": [
{
"id": "ecf2746031ca44dca70f8ac81227b52f",
"type": "NinjaTrader.Cbi.Order",
"time": "2026-03-18T13:58:43.9037681",
"epoch": 1773867523903,
"name": "",
"ocoId": "",
"onBehalfOf": "",
"clientId": -1,
"account": "Sim101",
"instrument": "NQ 06-26",
"instrumentType": "Future",
"orderType": "Limit",
"orderState": "Working",
"orderAction": "Buy",
"quantity": 1,
"quantityChanged": 1,
"limitPrice": 24603.25,
"limitPriceChanged": 24603.25,
"stopPrice": 0.0,
"stopPriceChanged": 0.0,
"averageFillPrice": 0.0,
"filled": 0,
"timeInForce": "Day",
"gtd": "2099-12-01T00:00:00.0000000",
"fromEntrySignal": null,
"hasOverfill": false,
"isBacktestOrder": false,
"isLimit": true,
"isLiveUntilCancelled": false,
"isLong": true,
"isMarket": false,
"isMarketIfTouched": false,
"isShort": false,
"isSimulatedStop": false,
"isStopLimit": false,
"isStopMarket": false,
"isTrackingConfigured": false,
"isTrackingEnabled": false,
"userData": "<NinjaTrader />",
"ownerStrategy": {
"id": null,
"name": null,
"displayName": null
}
}
],
"count": 1,
"success": true
}

WebSocket API

This request can also be made over the WebSocket API. Query parameters are passed inside args.

{
"action": "rpc",
"id": "my-request-id",
"api": "GetAllOrders",
"args": {
"activeOnly": true
}
}

To include historical orders with a time filter:

{
"action": "rpc",
"id": "my-request-id",
"api": "GetAllOrders",
"args": {
"activeOnly": false,
"lookbackTime": 86400
}
}