GET All Strategies
- NT8
- Tradovate
Get live strategies across all accounts NT8
Lists live NinjaScript strategies across every account in the connected NinjaTrader instance.
Endpoint
GET /v1/api/strategies
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
includeTerminal | boolean | Optional | Include terminal strategies. Defaults to false. |
Code examples
- Python
- JavaScript
- cURL
import requests
token = 'my-secret-token'
url = 'https://app.crosstrade.io/v1/api/strategies'
headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json',
}
response = requests.get(url, headers=headers)
print(response.status_code, response.text)
const token = 'my-secret-token';
fetch('https://app.crosstrade.io/v1/api/strategies', {
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/strategies" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
Response
- 200
- 400
{
"count": 1,
"accounts": [
{
"name": "Sim101",
"displayName": "Sim101",
"connection": "Simulated Data Feed",
"strategyCount": 1
}
],
"strategies": [
{
"id": "370780525",
"account": "Sim101",
"strategyName": "CtImmediateLineEntry",
"displayName": "CtImmediateLineEntry(9,21,1)",
"hostMode": "chart",
"isChartHosted": true,
"state": "Realtime",
"instrumentName": "ES 09-26",
"position": "Long",
"quantity": 1,
"averagePrice": 7438.5,
"unrealizedPnl": 0.0
}
],
"success": true
}
{
"success": false,
"error": "Invalid request"
}
Platform nuances
This endpoint requires CrossTrade NT8 Add-On v1.13.0+.
WebSocket API
This request can also be made over the WebSocket API.
{
"action": "rpc",
"id": "my-request-id",
"api": "ListAllStrategies",
"args": {
"includeTerminal": false
}
}
Tradovate
Not available on Tradovate
NinjaScript strategies are a NinjaTrader desktop concept, so there is no /v1/api/tv equivalent for listing strategies. See the Tradovate API overview for what the Tradovate surface covers.
To inspect live state across linked accounts instead, use the Tradovate accounts snapshot, positions, or orders.