Skip to main content
The userOrders query returns all active orders for your account within a market deployer. You can filter the results to a specific contract by passing its contractId, or set it to 0 to retrieve orders across all contracts. Use the returned id field to reference orders in cancel or modify actions.

Request

string
required
Must be "userOrders".
string
required
Your account ID, obtained from the registerAccount action.
integer
required
The market deployer to query orders within.
integer
Filter orders by contract. Use 0 or omit to return orders across all contracts. Pass a positive integer to restrict results to that specific contract.

Response

Order Fields

string
Exchange-assigned order ID (int64 as a decimal string). Use this value in cancel and modify actions to reference the order.
string
Your client-assigned order ID set at placement time (the c field). "0" means no client ID was assigned.
integer
The contract this order is placed on. Cross-reference with configs for the contract name and scales.
string
"B" for a buy (bid) order; "S" for a sell (ask) order.
string
"L" for a limit order; "M" for a market order.
string
Order duration policy: "Gtc" (Good Till Cancel), "Ioc" (Immediate Or Cancel), or "Alo" (Add Liquidity Only / post-only).
string
Order price as a raw integer string. Divide by 10^priceScale from configs to get the display value.
string
Order quantity as a raw integer string. Divide by 10^qtyScale from configs to get the display value.
string
Leverage applied to this order at placement time.
string
Current order status: "Open" (resting), "Filled" (fully matched), or "Canceled" (removed from book).
string
"C" for cross margin; "I" for isolated margin.
boolean
true if this order can only reduce an existing position (it will be rejected or auto-canceled if it would open or increase a position).