GET Margin Snapshots
- NT8
- Tradovate
NinjaTrader 8
There is no equivalent NT8 endpoint that returns raw margin snapshots across every account. Use GET Account to retrieve the margin values available for a specific NT8 account.
The Tradovate endpoint on this page is REST-only. The WebSocket API applies to supported CrossTrade NT8 add-on routes, not this Tradovate route.
Margin snapshots Tradovate
Returns one {environment, userId, name, data} envelope for every linked identity. Each envelope's inner data array contains raw Tradovate /marginSnapshot/list rows: initial and maintenance margin, total used margin, and liquidation thresholds (autoLiqLevel, liqOnlyLevel) as Tradovate reports them. CrossTrade passes these fields through unchanged and does not compute them.
Endpoint
GET /v1/api/tv/marginsnapshots
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Code examples
- Python
- JavaScript
- cURL
import requests
token = 'my-secret-token'
url = "https://app.crosstrade.io/v1/api/tv/marginsnapshots"
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(f"Response Code: {response.status_code}, Response Text: {response.text}")
const token = 'my-secret-token';
const url = "https://app.crosstrade.io/v1/api/tv/marginsnapshots";
fetch(url, {
method: "GET",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json"
}
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
TOKEN="my-secret-token"
curl -X GET "https://app.crosstrade.io/v1/api/tv/marginsnapshots" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
Response
- 200
- 401
- 403
- 429
- 500
- 502
- 503
{
"success": true,
"data": [
{
"environment": "demo",
"userId": "12345",
"name": "Demo Trader",
"data": [
{
"id": 123456,
"timestamp": "2026-07-15T14:32:05.184Z",
"riskTimePeriodId": 9,
"initialMargin": 1760.00,
"maintenanceMargin": 1600.00,
"totalUsedMargin": 1600.00,
"fullInitialMargin": 1760.00,
"autoLiqLevel": -2000,
"liqOnlyLevel": -2000,
"positionMargin": 1600,
"totalUsedFullMargin": 1760,
"openCollateralReq": 0
}
]
}
]
}
{
"success": false,
"error": "inactive_subscription"
}
{
"success": false,
"error": "tradovate_not_linked"
}
// retryAfter is integer seconds; also sent as Retry-After.
{
"success": false,
"error": "rate_limited",
"detail": "CrossTrade API rate limit exceeded (180 requests/min per user). Retry after 1s.",
"retryAfter": 1
}
{
"success": false,
"error": "internal_error"
}
{
"success": false,
"error": "tradovate_unavailable",
"detail": "Tradovate is temporarily unavailable. Please try again shortly."
}
{
"success": false,
"error": "temporarily_disabled"
}
Success field types
| Field | Type | Description |
|---|---|---|
success | boolean | Outer request status. |
data | array of objects | Identity envelopes. |
data[].environment, data[].userId, data[].name | string | Environment, identity ID and display name. |
data[].data | array of objects or object | Margin rows, or an error object. |
data[].data.error | string | Identity read failure. |
data[].data[].id, data[].data[].riskTimePeriodId | integer | Snapshot and risk-period IDs. |
data[].data[].timestamp | string | ISO 8601 timestamp. |
data[].data[].initialMargin, data[].data[].maintenanceMargin, data[].data[].fullInitialMargin, data[].data[].positionMargin | float | Margin requirements. |
data[].data[].totalUsedMargin, data[].data[].totalUsedFullMargin, data[].data[].openCollateralReq | float | Margin usage and collateral requirement. |
data[].data[].autoLiqLevel, data[].data[].liqOnlyLevel | float | Liquidation thresholds. |
Platform nuances
Authentication uses the same bearer token as the rest of the CrossTrade API and requires a plan with API access (Pro) plus a linked Tradovate account. Unlinked users receive 403 tradovate_not_linked.
This endpoint is REST-only and has no WebSocket equivalent.