GET ATM Templates
Enumerate 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.
Returns an empty array if no templates have been saved.
List ATM templates
GET /v1/api/atm-templates
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
No parameters required.
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
}
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": {}
}