GET Suggest Contracts
Searches Tradovate contracts and can resolve the active front month from a root symbol.
This route is specific to linked Tradovate accounts.
GET /v1/api/tv/contracts/suggest?text=Runs server-side for a linked Tradovate account, so NinjaTrader can be closed. Tradovate does not currently use the CrossTrade WebSocket API. See the Tradovate API guide.
Search contracts
GET /v1/api/tv/contracts/suggest?text=ES
Contract autocomplete against Tradovate's contract database. Pass a root like ES to resolve the active front month, or a partial symbol to list matching contracts. For an exact-symbol lookup, use /v1/api/tv/contracts/find.
Auth is the same bearer token as the rest of the CrossTrade API, on a plan with API access (Pro), plus a linked Tradovate account. Unlinked users receive 403 tradovate_not_linked.
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Required | Root or partial symbol to search, e.g. ES |
Code Examples
- Python
- JavaScript
- cURL
import requests
token = 'my-secret-token'
url = "https://app.crosstrade.io/v1/api/tv/contracts/suggest"
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers, params={"text": "ES"})
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/contracts/suggest?text=ES";
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/contracts/suggest?text=ES" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
Response
- 200
- 400
{
"success": true,
"data": [
{ "id": 3543031, "name": "ESU6", "contractMaturityId": 46127 },
{ "id": 3543032, "name": "ESZ6", "contractMaturityId": 46128 }
]
}
Rows are raw Tradovate contract records, ordered by Tradovate's suggestion ranking; the first row for a root is normally the active front month.
{
"success": false,
"error": "text_required"
}
Returned when the text query parameter is missing. Unlinked users receive 403 with "error": "tradovate_not_linked".