Skip to content

Orders Channel

Topic: orders:{user_id}

Delivers your orders as they are accepted and filled. Money arrives as dollar strings and contract counts as quantity strings; see Wire format.

  • id : The unique id of the order.
  • market_id : The id of the market.
  • client_order_id : The id you supplied when placing the order, if any.
  • fix_order : true if the order arrived over FIX rather than REST.
  • quantity : The number of contracts to buy or sell, as a quantity string. Null on an order sized by amount instead.
  • filled : How many of the order’s contracts have been filled so far, as a quantity string.
  • filled_percentage : The same, as an integer percentage (0–100), truncated.
  • amount : Order size in dollars, for an order entered by amount rather than by quantity, which only an STX app does. Null on an order sized by quantity; the two are alternatives, not a value and its derivation.
  • filled_amount : The dollars at risk on the filled portion, summed over the order’s trades: filled × price on a buy, filled × (max_price - price) on a sell. "0.0000" until something fills.
  • price : The order’s price, as a dollar string. Null when order_type is market. Stored to seven decimal places, so this field can be wider than the usual four.
  • avg_price : The average price the filled portion traded at, as a dollar string rounded to the cent. Null until something fills.
  • total_value : Total premium across every fill on this order: the sum of filled × price over its trades. "0.0000" until something fills.
  • odds_type : Legacy. decimal or american, when an STX app entered the order in odds rather than price. Null for orders placed through the API.
  • odds_value : Legacy. The odds that app order was entered at, as a string. Null for orders placed through the API.
  • action : Whether the order is a buy or a sell.
  • order_type : limit or market. A limit order sets a ceiling for a buy or a floor for a sell. If it cannot fill completely it rests on the book for the remainder. A market order has no price limit and either fills completely or has its remainder cancelled.
  • fill_mode : How the order matches: normal, post_only or fill_or_kill for a limit order, cancel_unfilled for a market order, rfq or quote for an order of a combination bind. A post_only order only ever rests on the book: one that would match on arrival is cancelled with cancellation_reason auto_matching. A fill_or_kill order never rests: it reaches filled, or is cancelled with cancellation_reason auto_matching and nothing filled. Post-only and fill-or-kill are available on US demo (the sandbox), not yet on production exchanges; see Which fill modes an exchange accepts.
  • status : One of created, requested, accepted, delayed, open, filled, rejected, cancelled or partially_cancelled; see Market and order status.
  • time : When the order was created, ISO 8601.
  • inserted_at : The same instant, as an integer in Unix microseconds.
  • accepted_at : When the matching engine accepted the order, as Unix microseconds. Null while the order is still pending.
  • expires_at : When the contracts this order trades expire, as Unix microseconds: the market’s expiration, copied onto the order when it is placed. Null when the market has no event. Not the same as expiration_time, which is when a good_till_time order stops resting on the book.
  • cancellation_reason : Why the order was cancelled: by_player, market_closed, market_cancelled, expired, by_operator, auto_matching, on_disconnect, negative_balance, insufficient_assets, member_position_limit, admin_trade_cancelled or admin_trade_price_change. Null unless status is cancelled or partially_cancelled.
  • rejection_reason : Why the order was rejected, e.g. insufficient_assets, account_limits_reached, market_liability_limit, member_position_limit, match_with_self, invalid_geo_location, wrong_market_state or validation_error. Null unless status is rejected.

See Risk controls for what these do.

  • expiration : good_till_start, good_till_time, or null for an order that rests until cancelled.
  • expiration_time : When a good_till_time order expires, as Unix microseconds. Null for every other expiration.
  • delayed_until : When an order held by the in-play delay reaches the book, as Unix microseconds. Null when no delay applies.
  • placed_pre_start : Whether the order was placed before the event started.
  • ip_address : The IP address the order was placed from. Null if none was recorded.
  • device_id : The device id the order was placed from. Null if none was recorded.
  • ux_action : The intent the order was placed with in the app: buy_yes, buy_no, sell_yes or sell_no. Null for an order placed through the API.
Use case Message to send
Join and receive your open orders ["3","3","orders:<user_id>","phx_join",{}]
Join filtered to two markets (see filtering) ["3","3","orders:<user_id>","phx_join",{"market_ids":["<uuid>","<uuid>"]}]
Join with cancel_on_disconnect enabled (see Risk controls) ["3","3","orders:<user_id>","phx_join",{"cancel_on_disconnect":true,"ping_timeout":5000}]
Change the market filter without rejoining ["3","4","orders:<user_id>","select_market_ids",{"market_ids":["<uuid>"]}]
Keep a cancel_on_disconnect session alive ["3","5","orders:<user_id>","ping",{}]
["3","3","orders:<user_id>","phx_join",{}]

The reply echoes the filter that was applied, and the cancel_on_disconnect settings when you asked for them:

{"status":"ok","response":{"selected_market_ids":null}}
{"status":"ok","response":{"selected_market_ids":null,"cancel_on_disconnect":true,"ping_timeout":5000}}

ping_timeout is clamped to 5000–20000 ms, so read the value back from the reply rather than assuming the one you sent was honored.

[null, null, "orders:e6528824-b4e0-4ff8-bd70-36e5904738d1", "all_orders", { "orders": [Order]}]

orders is a list of Order objects, described above, empty if you have none open, and also empty when a market_ids filter matches nothing.

[
null,
null,
"orders:e6528824-b4e0-4ff8-bd70-36e5904738d1",
"all_orders",
{
"orders": [
{
"id": "4702e9b6-211a-4805-a605-0eb0817ee9b3",
"market_id": "e00651a3-10cb-4bc1-9e1f-c5ea1796c83b",
"client_order_id": "my-order-001",
"fix_order": false,
"quantity": "100.00",
"filled": "40.00",
"filled_percentage": 40,
"price": "0.5800",
"avg_price": "0.5800",
"amount": null,
"filled_amount": "23.2000",
"total_value": "23.2000",
"odds_type": null,
"odds_value": null,
"action": "buy",
"order_type": "limit",
"fill_mode": "normal",
"status": "open",
"time": "2026-10-10T15:04:12.483920Z",
"inserted_at": 1791644652483920,
"accepted_at": 1791644652501376,
"expires_at": 1823227199999999,
"cancellation_reason": null,
"rejection_reason": null,
"expiration": null,
"expiration_time": null,
"delayed_until": null,
"placed_pre_start": true,
"ip_address": "203.0.113.42",
"device_id": null,
"ux_action": null
}
]
}
]

Pushed when an order is accepted or filled

Section titled “Pushed when an order is accepted or filled”
[null, null, "orders:e6528824-b4e0-4ff8-bd70-36e5904738d1", "new_open_order", Order]

One frame per order, carrying the whole object rather than a diff.

[
null,
null,
"orders:e6528824-b4e0-4ff8-bd70-36e5904738d1",
"new_open_order",
{
"id": "4702e9b6-211a-4805-a605-0eb0817ee9b3",
"market_id": "e00651a3-10cb-4bc1-9e1f-c5ea1796c83b",
"client_order_id": "my-order-001",
"fix_order": false,
"quantity": "100.00",
"filled": "70.00",
"filled_percentage": 70,
"price": "0.5800",
"avg_price": "0.5800",
"amount": null,
"filled_amount": "40.6000",
"total_value": "40.6000",
"odds_type": null,
"odds_value": null,
"action": "buy",
"order_type": "limit",
"fill_mode": "normal",
"status": "open",
"time": "2026-10-10T15:04:12.483920Z",
"inserted_at": 1791644652483920,
"accepted_at": 1791644652501376,
"expires_at": 1823227199999999,
"cancellation_reason": null,
"rejection_reason": null,
"expiration": null,
"expiration_time": null,
"delayed_until": null,
"placed_pre_start": true,
"ip_address": "203.0.113.42",
"device_id": null,
"ux_action": null
}
]

STX is operated by XV Exchange, LLC, a Designated Contract Market regulated by the U.S. Commodity Futures Trading Commission (CFTC). Contracts traded on STX are cleared by XV Clearing, LLC, a CFTC-registered Derivatives Clearing Organization. Trading involves substantial risk of loss and may not be appropriate for everyone. Members risk losing the cost to enter any transaction, including fees. Consider whether trading is appropriate for you in light of your experience and financial resources. Nothing on this site is investment advice or a recommendation to trade. Past performance is not indicative of future results.

© 2026 STX. All rights reserved.llms.txtllms-full.txtView as Markdown
Docs version v1.10.5