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
Remaining quantity as a raw integer string — it decreases as the order fills. This is not the quantity you originally submitted. Divide by
10^qtyScale from configs to get the display value.string
The quantity originally submitted, raw and unchanging. Filled quantity is
originalSize − size — use the pair to render a “filled of total” column.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).boolean
true when the order is a position-level TP/SL, whose closing direction follows the position automatically. false for an ordinary order or a standalone trigger order. It corresponds one-to-one with the isPositionTpsl parameter of the tpSl action.string
When this order is a TP/SL child, the ID of its parent order. Otherwise
"0".object
Take-profit attached to this order at placement. Present whether or not the order has filled, so a resting order can display its armed exit. Contains:
isSet(boolean) — whether a take-profit is armed. The invariantisSet == (triggerPrice > 0)always holds, so this single field is enough to test for presence.triggerPrice(string) — trigger price (raw)."0"whenisSetisfalse.price(string) — order price used after triggering (raw)."0"means close at market.triggerType(int) — price source:0for mark price,1for oracle price. Only these two values are returned.size(string) — quantity to close (raw)."0"closes the whole position.
object
Stop-loss attached to this order at placement. Same fields as
tp.Conditional orders
A conditional order carriesisConditional: true and a parentOrderId; every other field is serialized identically to an ordinary order.
The same
tp / sl objects appear on order entries pushed by the orderUpdates channel, field for field, so one parser handles both.