STXOrderService— place, cancel, and query ordersSTXTradeService— query fills (trades)
Place an order
Parameters
price | Integer cents. 50 = 50¢. Ignored for market orders. |
quantity | Number of contracts. |
marketId | From STXMarketService.GetMarketInfosAsync. |
action | STXOrderAction.buy / STXOrderAction.sell |
orderType | STXOrderType.limit / STXOrderType.market |
clientOrderId | Your idempotency key. If the call retries you won’t get a double-fill. |
cancelOnDisconnect | If true, the exchange cancels this order when the websocket drops. Requires STXActiveOrdersChannel to be joined — see below. |
Cancel-on-disconnect requires the active orders channel
If you passcancelOnDisconnect: true but haven’t joined STXActiveOrdersChannel, the call throws STXCancelOnDisconnectNotEnabledException. For the market-maker workflow, always join the channel first (it costs nothing):
cancelOnDisconnect: false.
Batch orders
Placing many orders at once is one round-trip instead of N:Cancel orders
CancelAllOrdersAsync returns the list of every cancelled order, which is handy to reconcile against your own state.
Order history
Trades (fills)
Each fill is a trade:Real-time: fills + order status
Polling the REST endpoints works but adds latency. The websocket channels push updates as they happen:STXActiveOrdersChannel— every state change on an open order (open→partially_filled→filled/cancelled)STXActiveTradesChannel— every new trade (fill)
A canonical market-maker loop
Pulled straight fromcssdk-console’s STXWorker.cs:
See also
- Reference → Trading — full method signatures
- WebSockets — real-time order/trade/balance streams
- Errors & retries — common order errors

