GET Accounts
- NT8
- Tradovate
Get list of all accounts NT8
Lists the NinjaTrader accounts available to the authenticated CrossTrade user.
Endpoint
GET /v1/api/accounts
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/accounts"
headers = {
"Authorization": f"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}")
const token = 'my-secret-token';
const url = "https://app.crosstrade.io/v1/api/accounts";
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/accounts" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
Response
- 200
- 400
- 401
- 408
- 429
- 500
{
"accounts": [
{
"id": 2,
"name": "Sim101",
"status": "Enabled"
}
],
"success": true
}
{
"error": "The request timed out, please check connection to NT8 Add-On."
}
{
"error": "Invalid bearer token"
}
{
"error": "Client not ready to receive requests, disconnected."
}
// Seconds to wait; also sent as Retry-After.
{
"error": "Rate limit exceeded",
"retryAfter": 1
}
{
"success": false,
"error": "internal_error"
}
Success field types
| Field | Type | Description |
|---|---|---|
success | boolean | true on success. |
accounts | array of objects | Available accounts; may be empty. |
accounts[].id | integer | NT8 account identifier. |
accounts[].name | string | Account name. |
accounts[].status | string | Account status, such as Enabled. |
Platform nuances
The response returns the account list in accounts. Each documented NT8 account record contains
id, name, and status.
WebSocket API
This request can also be made over the WebSocket API.
{
"action": "rpc",
"id": "my-request-id",
"api": "ListAccounts",
"args": {}
}
Get list of all accounts Tradovate
Lists every cached Tradovate account linked to the authenticated CrossTrade user. The request executes server-side against the Tradovate Web API and does not require the NinjaTrader add-on to be connected.
Endpoint
GET /v1/api/tv/accounts
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/accounts"
headers = {
"Authorization": f"Bearer {token}"
}
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}")
const token = 'my-secret-token';
const url = "https://app.crosstrade.io/v1/api/tv/accounts";
fetch(url, {
method: "GET",
headers: {
"Authorization": `Bearer ${token}`
}
})
.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/accounts" \
-H "Authorization: Bearer $TOKEN"
Response
- 200
- 401
- 403
- 429
- 500
- 502
- 503
{
"success": true,
"data": [
{
"accountId": "12345678",
"environment": "demo",
"userId": "12345",
"name": "DEMO12345678",
"accountType": "Customer",
"active": true,
"archived": false,
"legalStatus": "Individual",
"marginAccountType": "Speculator",
"ts": "2026-10-01T12:00:00+00:00",
"updated": "2026-10-27T12:00:00+00:00"
}
]
}
{
"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 | true on success. |
data | array of objects | Linked accounts; may be empty. |
data[].accountId, data[].userId | string | Account and owning identity IDs, encoded as strings. |
data[].name | string | Account name. |
data[].environment | string | demo or live. |
data[].accountType, data[].legalStatus, data[].marginAccountType | string | Broker account classifications. |
data[].active, data[].archived | boolean | Account flags. |
data[].ts, data[].updated | string | ISO 8601 record timestamps. |
Platform nuances
- The response uses a
datawrapper, unlike the NT8accountsfield. - Account records identify the Tradovate environment and identity that owns each account.
- The endpoint works while NinjaTrader is closed.
See the Tradovate API overview for the full field grammar, mutation safety guarantees, and error table.