This page documents all enum values, type constants, and data format conventions used across the TestMax API. Use this as a quick reference when building strategies or integrating with the API.
OrderType
The type of order to place. Used in the type field of Order/place.
Value
Name
Description
Required price fields
1
Limit
Executes at the specified price or better. Rests in the book until filled or canceled.
limitPrice
2
Market
Executes immediately at the current market price.
None
3
StopLimit
Becomes a limit order when the stop price is triggered.
stopPrice, limitPrice
4
Stop
Becomes a market order when the stop price is triggered.
stopPrice
When to use each type
Market (2): Fast entries and exits where execution certainty matters more than price. Used for scalping, emergency flatten, and momentum entries.
Limit (1): Entries at a specific price or better. Used for pullback entries, take-profit orders, and scaling into positions.
Stop (4): Breakout entries and stop-loss protection. Triggers when the market trades through the stop price.
StopLimit (3): Combines a stop trigger with a limit price to avoid slippage on breakout entries. The limit price controls the worst acceptable fill price.
OrderSide
The direction of the order. Used in the side field of Order/place.
Value
Name
Description
0
Buy
Buy to open a long position or close a short position
1
Sell
Sell to open a short position or close a long position
OrderStatus
The current state of an order. Returned in the status field of Order/search and Order/searchOpen.
Value
Name
Description
1
Partial
Order is partially filled — some contracts executed, remaining are still working
2
Filled
Order is completely filled — all contracts executed
3
Canceled
Order was canceled before being fully filled
6
Pending
Order is active and waiting to be filled (limit/stop orders resting in the book)