GET ATM Templates
- NT8
- Tradovate
List ATM templates NT8
Lists the ATM strategy templates saved in your NinjaTrader user data directory. The names returned by this endpoint are the valid values for the strategy field in POST /place-order. Use this to discover available templates at runtime without hardcoding names in your integration.
Endpoint
GET /v1/api/atm-templates
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/atm-templates"
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/atm-templates";
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/atm-templates" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
Response
- 200
{
"templates": [
"MyScalpTemplate",
"SwingEntry2R",
"TightStop"
],
"count": 3,
"success": true
}
Platform nuances
No parameters are required. The endpoint returns an empty array if no templates have been saved in the local NinjaTrader installation.
WebSocket API
This request can also be made over the WebSocket API. No arguments are required.
{
"action": "rpc",
"id": "my-request-id",
"api": "GetAtmTemplates",
"args": {}
}
Tradovate
Not available on Tradovate
NT8 ATM templates are desktop objects saved in your NinjaTrader install; on Tradovate, attach brackets with the inline atm_* fields on Place Order instead (see the Tradovate API overview for the field grammar).