Skip to content
Back to App

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}
ComponentDescriptionExample
CONFixed prefixCON
FFuturesF
USExchange/regionUS
{symbol}Instrument symbolENQ, EP, GCE
{monthYear}Contract month and yearH25 (March 2025)

Full example: CON.F.US.ENQ.H25 represents the March 2025 Nasdaq 100 E-mini futures contract.

The simulator generates contract IDs using the current front-month code at call time — in July 2026 a search returns IDs ending in .N26. When resolving a contractId you send in a request, the simulator ignores the month/year segment and matches on the symbol, so example IDs with older month codes still work.

Month codes

CodeMonth
FJanuary
GFebruary
HMarch
JApril
KMay
MJune
NJuly
QAugust
USeptember
VOctober
XNovember
ZDecember

POST Contract/search

Search for contracts by name, symbol, or description. Returns up to 50 matching active instruments. POST Contract/available is an alias with identical behavior.

URL: POST /api/topstep-sim/Contract/search

Authentication: Bearer token required.

Request body

{
"searchText": "NQ"
}
FieldTypeRequiredDescription
searchTextstring or nullNoSearch 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.N26",
"name": "NQN26",
"description": "E-Mini NASDAQ 100 Futures",
"tickSize": 0.25,
"tickValue": 5.00,
"activeContract": true,
"symbolId": "NQ"
}
]
}
FieldTypeDescription
contractsarrayList of matching contract objects
contracts[].idstringUnique contract identifier. Use this as contractId in order and position endpoints.
contracts[].namestringSymbol plus the current contract month code (e.g., "NQN26")
contracts[].descriptionstringFull instrument name
contracts[].tickSizenumberMinimum price increment
contracts[].tickValuenumberDollar value per tick per contract
contracts[].activeContractbooleanAlways true — only active instruments are returned
contracts[].symbolIdstringPlain instrument symbol (e.g., "NQ", "ES", "GC")

Example

# Search for NQ (Nasdaq 100) contracts
result = 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"]

Common searches

Search textWhat it finds
"NQ"Nasdaq 100 E-mini
"ES"S&P 500 E-mini
"GC"Gold Futures
"CL"Crude Oil Futures
"EURUSD"Euro/US Dollar
nullAll 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"
}
FieldTypeRequiredDescription
contractIdstringYesThe exact contract ID to look up

Response

{
"success": true,
"errorCode": 0,
"errorMessage": null,
"contract": {
"id": "CON.F.US.ENQ.H25",
"name": "NQN26",
"description": "E-Mini NASDAQ 100 Futures",
"tickSize": 0.25,
"tickValue": 5.00,
"activeContract": true,
"symbolId": "NQ"
}
}

Unlike Contract/search, the response carries a single contract object (not a contracts array). The id echoes the contract ID you sent; the fields are otherwise the same as Contract/search. An unknown or missing contractId returns errorCode 1, "Contract not found".

Example

# Look up a known contract
result = api("Contract/searchById", {
"contractId": "CON.F.US.ENQ.H25"
})
if result["success"] and result.get("contract"):
contract = result["contract"]
print(f"Found: {contract['name']}{contract['description']}")
else:
print("Contract not found")

Available instruments

TestMax supports a wide range of popular futures and forex instruments:

SymbolInstrumentTick SizeTick Value
NQNasdaq 100 E-mini0.25$5.00
ESS&P 500 E-mini0.25$12.50
GCGold Futures0.10$10.00
CLCrude Oil Futures0.01$10.00
EURUSDEuro/US Dollar0.00005$6.25

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.