REST Endpoints
- Get Orders: GET /api/v1/orders
- Get User Orders: GET /api/v1/user/orders
- Place Order: POST /api/v1/user/intent (order_create payload)
- Cancel Order: POST /api/v1/user/intent (order_cancel payload)
Order types and Time-in-Force
This section describes all supported order types for entries and how Time-in-Force (TIF) affects execution. Entry orders support two base types; conditional entries and bracket exits extend these with triggers.Entry orders
-
Market
- type:
"market" - Executes immediately against the order book at the best available prices.
- Any unfilled remainder does not rest on the book; pair with
time_in_force: "IOC"or"FOK"to enforce stricter behavior explicitly.
- type:
-
Limit
- type:
"limit" - Executes up to the specified
price; any unfilled remainder can rest on the book depending on TIF. - Common pairings:
time_in_force: "GTC"to rest,"IOC"to cancel any remainder,"FOK"to require full fill,"PostOnly"to ensure it only adds liquidity (rejected if it would take).
- type:
time_in_force explicitly for clarity rather than relying on implicit defaults.
Time-in-Force
- GTC — Good-Till-Cancelled. Rests until filled or cancelled.
- IOC — Immediate-Or-Cancel. Fill what you can immediately; cancel the rest.
- FOK — Fill-Or-Kill. Either fully fills immediately or is cancelled.
- PostOnly — Must add liquidity; if it would execute immediately, it is rejected.
"GTC" | "IOC" | "FOK" | "PostOnly".
Conditional entries (stop orders)
You can turn an entry into a stop-style order by supplyingtrigger_price:
-
Stop-Market
type: "market"+trigger_price- Activates when the mark price crosses the trigger; executes as a market-taker on activation.
-
Stop-Limit
type: "limit"+trigger_price+price- Activates when the mark price crosses the trigger; places a limit order at
priceon activation.
Commit and status
Order intents are processed asynchronously. ActionStatus values indicate lifecycle state:- 0 = Pending — accepted, awaiting commitment
- 1 = Success — committed to the ledger
- 2 = Rejected — failed validation or execution
POST /api/v1/user/intent/commit if you want the API to wait and return the final status (with an optional error_message when Rejected).
SDK Examples
Examples by type
Limit GTC (rest on book):Response fields
timestamp_ms— Unix milliseconds when the order was created.timestamp— Unix seconds (deprecated; kept for backward compatibility).is_cross— true for cross margin, false for isolated.initial_margin— required initial margin for the order at current price/size (if available).time_in_force— one ofGTC | IOC | FOK | PostOnly.reduce_only— when true, the order will not increase exposure.trigger_price— present for conditional entries (see Stop-Market/Stop-Limit above).
OrderResponse.
Triggers and Brackets
-
Order field:
trigger_price- If set, the order is conditional and activates when the mark crosses the trigger (boundary equality applies). Direction is derived from side and relation to current mark.
-
Bracket field:
bracket- Attach Take Profit / Stop Loss to an entry.
- Structure:
mode:FULLorPARTIAL.take_profit/stop_loss:{ trigger_price, order_type: MARKET|LIMIT, limit_price? }(limit_pricerequired for LIMIT).
- Execution semantics: reduce-only, IOC. MARKET legs are converted to LIMIT IOC with a slippage guard band.
-
Reduce-only
- Use
reduce_only: trueto prevent increasing exposure. Triggered bracket legs always enforce reduce-only.
- Use