Order types
STX supports two order types: limit and market. The type is set via the
orderType field when calling confirmOrder.
Limit Orders
Section titled “Limit Orders”A limit order specifies the worst price you are willing to accept:
- Buy limit — sets a price ceiling. You will pay no more than your limit price per contract. The exchange fills you at the best available price up to your limit.
- Sell limit — sets a price floor. You will receive no less than your limit price per contract.
If the full quantity cannot be filled at the limit price or better, the unfilled remainder is placed in the order book and waits for a matching counterparty. It stays there until fully filled or explicitly cancelled.
Limit orders are the correct choice for market makers. If you want to name a price and have others trade against you, you must use a limit order.
Market Orders
Section titled “Market Orders”A market order does not constrain the price:
- Buy market — buys at the best available offer price, sweeping through the book until filled or no more contracts are available.
- Sell market — sells at the best available bid, sweeping downward.
Any quantity that cannot be filled immediately is cancelled — market orders never rest in the book. They are used to take existing liquidity, not to provide it.
!!! warning
On a thin book, a large market order can fill across a wide price range. Always check
current depth via bids and offers on the marketInfos
query before placing a large market order.
Placing an Order
Section titled “Placing an Order”mutation { confirmOrder( userOrder: { marketId: "4ae3dc52-f4a1-45bc-91c7-ff47618b7d67" orderType: LIMIT action: BUY price: 4500 quantity: 10 } geoLocation: <geo-license-code> ) { order { id status price quantity action orderType } errors }}Prices are in integer cents — 4500 means $45.00.
!!! note
confirmOrder is a request, not a guarantee. By the time your mutation reaches the
matching engine, market conditions may have changed. Check the order.status in the
response and subscribe to the active_orders channel
to receive fill and cancellation events in real time.
Cancelling Orders
Section titled “Cancelling Orders”Single cancel:
mutation { cancelOrder(orderId: "758fae8f-c210-4f01-bbbc-a3eb5cc74cd1") { status }}Batch cancel:
mutation { cancelOrders(orderIds: ["<id1>", "<id2>"]) { orderId status }}Cancel all open orders on your account:
mutation { cancelAllOrders { orderId status }}A cancel is also a request — by the time it reaches the engine the order may already be fully filled. The response per order tells you the actual status after the attempt.
Auto-Cancel on Disconnect
Section titled “Auto-Cancel on Disconnect”If your integration relies on continuous connectivity to manage order risk, you can instruct the server to cancel your open orders automatically if your WebSocket connection drops. See Auto-Cancel on Disconnect in the active orders channel documentation.

