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.

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 all matching instruments.

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.H25",
"name": "NQ",
"description": "E-Mini NASDAQ 100 Futures",
"tickSize": 0.25,
"tickValue": 5.00,
"contractSize": 1
}
]
}
FieldTypeDescription
contractsarrayList of matching contract objects
contracts[].idstringUnique contract identifier. Use this as contractId in order and position endpoints.
contracts[].namestringShort instrument symbol (e.g., "NQ", "ES", "GC")
contracts[].descriptionstringFull instrument name
contracts[].tickSizenumberMinimum price increment
contracts[].tickValuenumberDollar value per tick per contract
contracts[].contractSizenumberContract multiplier

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,
"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 contract
result = 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")

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$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.