Contracts
Contracts represent the trading instruments available in TestMax — futures like NQ (Nasdaq 100 E-mini), ES (S&P 500 E-mini), and GC (Gold), as well as forex pairs like EURUSD. Before placing orders or starting a replay, you need to resolve your desired instrument to a contract ID.
Contract ID format
Contract IDs follow the TopStep ProjectX convention:
CON.F.US.{symbol}.{monthYear}| Component | Description | Example |
|---|---|---|
CON | Fixed prefix | CON |
F | Futures | F |
US | Exchange/region | US |
{symbol} | Instrument symbol | ENQ, EP, GCE |
{monthYear} | Contract month and year | H25 (March 2025) |
Full example: CON.F.US.ENQ.H25 represents the March 2025 Nasdaq 100 E-mini futures contract.
Month codes
| Code | Month |
|---|---|
F | January |
G | February |
H | March |
J | April |
K | May |
M | June |
N | July |
Q | August |
U | September |
V | October |
X | November |
Z | December |
POST Contract/search
Search for contracts by name, symbol, or description. Returns all matching instruments.
URL: POST /api/topstep-sim/Contract/search
Authentication: Bearer token required.
Request body
{ "searchText": "NQ"}| Field | Type | Required | Description |
|---|---|---|---|
searchText | string or null | No | Search query to filter contracts. Matches against symbol, name, and description. Pass null or omit to return all available contracts. |
Response
{ "success": true, "errorCode": 0, "errorMessage": null, "contracts": [ { "id": "CON.F.US.ENQ.H25", "name": "NQ", "description": "E-Mini NASDAQ 100 Futures", "tickSize": 0.25, "tickValue": 5.00, "contractSize": 1 } ]}| Field | Type | Description |
|---|---|---|
contracts | array | List of matching contract objects |
contracts[].id | string | Unique contract identifier. Use this as contractId in order and position endpoints. |
contracts[].name | string | Short instrument symbol (e.g., "NQ", "ES", "GC") |
contracts[].description | string | Full instrument name |
contracts[].tickSize | number | Minimum price increment |
contracts[].tickValue | number | Dollar value per tick per contract |
contracts[].contractSize | number | Contract multiplier |
Example
# Search for NQ (Nasdaq 100) contractsresult = api("Contract/search", {"searchText": "NQ"})
if result["success"]: contracts = result.get("contracts", []) for c in contracts: print(f"{c['name']}: {c['id']} — {c['description']}") print(f" Tick: {c['tickSize']} (${c['tickValue']}/tick)")
# Use the first matching contract if contracts: CONTRACT_ID = contracts[0]["id"] TICK_SIZE = contracts[0]["tickSize"] TICK_VALUE = contracts[0]["tickValue"]curl -X POST https://api.test-max.com/api/topstep-sim/Contract/search \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_TOKEN" \ -d '{"searchText": "NQ"}'Common searches
| Search text | What it finds |
|---|---|
"NQ" | Nasdaq 100 E-mini |
"ES" | S&P 500 E-mini |
"GC" | Gold Futures |
"CL" | Crude Oil Futures |
"EURUSD" | Euro/US Dollar |
null | All available contracts |
POST Contract/searchById
Look up a specific contract by its exact contract ID. Use this when you already know the contract ID and need to retrieve its metadata (tick size, tick value, etc.).
URL: POST /api/topstep-sim/Contract/searchById
Authentication: Bearer token required.
Request body
{ "contractId": "CON.F.US.ENQ.H25"}| Field | Type | Required | Description |
|---|---|---|---|
contractId | string | Yes | The exact contract ID to look up |
Response
{ "success": true, "errorCode": 0, "errorMessage": null, "contracts": [ { "id": "CON.F.US.ENQ.H25", "name": "NQ", "description": "E-Mini NASDAQ 100 Futures", "tickSize": 0.25, "tickValue": 5.00, "contractSize": 1 } ]}The response format is identical to Contract/search.
Example
# Look up a known contractresult = api("Contract/searchById", { "contractId": "CON.F.US.ENQ.H25"})
if result["success"] and result.get("contracts"): contract = result["contracts"][0] print(f"Found: {contract['name']} — {contract['description']}")else: print("Contract not found")curl -X POST https://api.test-max.com/api/topstep-sim/Contract/searchById \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_TOKEN" \ -d '{"contractId": "CON.F.US.ENQ.H25"}'Available instruments
TestMax supports a wide range of popular futures and forex instruments:
| Symbol | Instrument | Tick Size | Tick Value |
|---|---|---|---|
| NQ | Nasdaq 100 E-mini | 0.25 | $5.00 |
| ES | S&P 500 E-mini | 0.25 | $12.50 |
| GC | Gold Futures | 0.10 | $10.00 |
| CL | Crude Oil Futures | 0.01 | $10.00 |
| EURUSD | Euro/US Dollar | 0.00005 | $5.00 |
Usage in the Algo Playground
When using the Algo Playground, the contract is resolved automatically based on the instrument you select in the UI. The resolved contract ID is stored in the CONTRACT_ID global variable and passed to the place_order() and close_all_positions() helper functions. You do not need to call Contract/search manually unless you are building a standalone bot.