Skip to main content

GET Accounts Summary

Get list of all accounts NT8​

Returns a consolidated snapshot of NT8 account balances, P&L, and positions.

Freshness contract​

Each request makes an RPC call to the connected add-on, which reads NT8's in-memory account and position objects. The API does not serve a stored snapshot as a fallback when the add-on is disconnected.

The top-level timestamp and epoch describe when the add-on assembled the response. They are not the last broker-update time or a guarantee that balances and positions were refreshed recently. Check each account's connectionStatus; an active CrossTrade add-on connection does not establish that its broker connection is healthy. Account and position values are collected sequentially, so the response is not an atomic broker snapshot.

This endpoint currently has no per-field age, max_age option, or maximum staleness guarantee. Do not treat a recent response timestamp alone as proof that it is safe to trade. If your integration requires a bounded-age broker valuation, this endpoint does not currently provide that contract.

Endpoint​

GET /v1/api/accounts/snapshot

Headers​

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Code examples​

import requests

url = "https://app.crosstrade.io/v1/api/accounts/snapshot"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

Response​

{
"type": "snapshot",
"timestamp": "2025-03-10T07:53:13.0908809-07:00",
"epoch": 1741618393090,
"accounts": [
{
"account": {
"id": 15,
"name": "Sim110",
"type": "NinjaTrader.Cbi.Account",
"displayName": "Sim110",
"primaryUser": null,
"provider": "Simulator",
"denomination": "UsDollar",
"status": "Enabled",
"isAccountFlat": false,
"dailyLossLimit": 0.0,
"minCashValue": 0.0,
"maxOrderSize": 0,
"maxPositionSize": 0,
"connection": "NinjaTrader.Cbi.Connection",
"connectionStatus": "Connected",
"lastTransactionSum": 0.0,
"item": {
"buyingPower": 0.0,
"cashValue": 153772.375,
"commission": 0.0,
"dailyLossLimit": 0.0,
"dailyProfitTrigger": 0.0,
"excessInitialMargin": 0.0,
"excessIntradayMargin": 0.0,
"excessMaintenanceMargin": 0.0,
"excessPositionMargin": 0.0,
"fee": 0.0,
"grossRealizedProfitLoss": 0.0,
"initialMargin": 0.0,
"intradayMargin": 0.0,
"longOptionValue": 0.0,
"longStockValue": 0.0,
"lookAheadMaintenanceMargin": 0.0,
"maintenanceMargin": 0.0,
"netLiquidation": 154185.375,
"netLiquidationByCurrency": 0.0,
"positionMargin": 0.0,
"realizedProfitLoss": 0.0,
"shortOptionValue": 0.0,
"shortStockValue": 0.0,
"sodCashValue": 0.0,
"sodLiquidatingValue": 0.0,
"totalCashBalance": 0.0,
"trailingMaxDrawdown": 0.0,
"unrealizedProfitLoss": 412.99999999999727,
"weeklyLossLimit": 0.0,
"weeklyProfitLoss": 0.0,
"weeklyProfitTrigger": 0.0
}
},
"positions": [
{
"type": "NinjaTrader.Cbi.Position",
"account": "Sim110",
"instrument": "MGC 12-25",
"instrumentType": "Future",
"marketPosition": "Long",
"quantity": 1,
"averagePrice": 2916.8,
"marketPrice": 2958.1,
"unrealizedProfitLoss": 412.99999999999727
}
]
}
],
"success": true
}

Platform nuances​

The NT8 snapshot includes top-level type, timestamp, and epoch fields. Account details and positions are grouped under accounts.

WebSocket API​

This request can also be made over the WebSocket API.

{
"action": "rpc",
"id": "my-request-id",
"api": "GetAccountSummary",
"args": {}
}