Skip to content

Fills Channel

Topic: fills:{user_id}

Delivers your executions as they trade and settle. Money arrives as dollar strings and contract counts as quantity strings; see Wire format.

To look up what one order filled at after the fact, call GET /api/v1/fills?order_ids=<order_id>. It takes several comma-separated order ids, combines with market_ids and status, and pages by cursor like the unfiltered list.

  • id : The unique id of the trade.
  • market_id : The id of the market the trade is on.
  • order_id : The id of the order this trade belongs to.
  • client_order_id : The client-supplied id of the order that created this trade, if any.
  • liquidity_action : Whether the linked order was a liquidity provider or taker.
  • device_id : The device id from the order that created this trade. Null if the order didn’t carry one.
  • ip_address : The IP address from the order that created this trade. Null if the order didn’t carry one.
  • action : Whether the trade is a buy or a sell.
  • status : created, open, settled or cancelled.
  • time : When the trade was created, ISO 8601.
  • inserted_at : The same instant, as an integer in Unix microseconds.
  • settled_at : When the trade’s status became settled, ISO 8601. Null until then, and stays null if the trade is cancelled instead.
  • expires_at : When the traded contracts expire, as an integer in Unix microseconds. Null when unknown.
  • amended : Whether STX has changed the trade’s price after it executed.
  • settlements_count : The number of settlements where this trade was the opening side. An integer, not a quantity string.

All quantity strings.

  • filled : The number of contracts this trade represents. Can be fractional.
  • remaining : How many of the trade’s contracts are still unsettled.
  • closing : How many of the trade’s contracts close an opposing position, rather than opening a new one. Zero for a purely opening trade.
  • closed_contracts : How many contracts were closed by a later trade.
  • expired_contracts : How many contracts were settled at market expiry.

All dollar strings.

  • price : The price the trade executed at.
  • premium : The premium paid or received for the trade (filled × pc_premium).
  • pc_premium : The premium per contract. On a sell this is price, the premium you receive; on a buy it is -price, the premium you pay, so this field is negative on every buy.
  • pc_risk : The risk per contract: price on a buy, max_price - price on a sell.
  • pc_to_win : What each contract gains if the position wins: max_price - price on a buy, price on a sell. It is not the same as pc_risk; the two are only equal at the midpoint.
  • remaining_premium : The premium on the unsettled portion.
  • remaining_risk : The risk on the unsettled portion.
  • remaining_to_win : What the unsettled portion gains if the position wins.
  • original_premium : The premium the trade represented once finalized, excluding any portion later used to close an opposing position.
  • original_risk : The same, for risk.
  • original_to_win : The same, for the gain if the position wins.

All dollar strings.

  • gross_pnl : The trade’s profit or loss before fees, accruing as settlements land.
  • closed_pnl : Profit or loss from contracts closed by a later trade.
  • expired_pnl : Profit or loss from contracts settled at market expiry.
  • trade_fee : The fee charged for this trade specifically.
  • total_fee : The all-in fee: trade_fee plus the settlement fees this trade has incurred. This is the fee to display. See total_fee.
  • closed_fee : The fee paid on contracts closed by a later trade.
  • expired_fee : The fee paid on contracts settled at market expiry.
  • remaining_potential_fee : The maximum fee that could still be charged on the unsettled portion.
  • max_potential_fee : Identical to remaining_potential_fee. It does not include fees already charged on the settled portion.
  • points : Loyalty points earned from the trade, updated as it settles. A number rounded to two places, not a money string.
Use case Message to send
Join and receive your open trades ["3","3","fills:<user_id>","phx_join",{}]
Join filtered to one market (see filtering) ["3","3","fills:<user_id>","phx_join",{"market_ids":["<uuid>"]}]
Change the market filter without rejoining ["3","4","fills:<user_id>","select_market_ids",{"market_ids":null}]
Check the connection is alive ["3","5","fills:<user_id>","ping",{}]
["3","3","fills:<user_id>","phx_join",{}]
{"status":"ok","response":{"selected_market_ids":null}}
[null, null, "fills:e6528824-b4e0-4ff8-bd70-36e5904738d1", "all_trades", { "trades": [Fill]}]

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

[
null,
null,
"fills:e6528824-b4e0-4ff8-bd70-36e5904738d1",
"all_trades",
{
"trades": [
{
"id": "a7469e3a-b608-483d-b12f-1c1534793274",
"market_id": "e00651a3-10cb-4bc1-9e1f-c5ea1796c83b",
"order_id": "4702e9b6-211a-4805-a605-0eb0817ee9b3",
"client_order_id": "my-order-001",
"liquidity_action": "taker",
"device_id": null,
"ip_address": "203.0.113.42",
"status": "open",
"time": "2026-10-10T15:04:12.501400Z",
"inserted_at": 1791644652501400,
"settled_at": null,
"expires_at": 1823227199999999,
"amended": false,
"settlements_count": 0,
"action": "buy",
"filled": "40.00",
"remaining": "40.00",
"closing": "0.00",
"closed_contracts": "0.00",
"expired_contracts": "0.00",
"price": "0.5800",
"premium": "-23.2000",
"pc_premium": "-0.5800",
"pc_risk": "0.5800",
"pc_to_win": "0.4200",
"remaining_premium": "-23.2000",
"remaining_risk": "23.2000",
"remaining_to_win": "16.8000",
"original_premium": "-23.2000",
"original_risk": "23.2000",
"original_to_win": "16.8000",
"gross_pnl": "0.0000",
"closed_pnl": "0.0000",
"expired_pnl": "0.0000",
"trade_fee": "0.9800",
"total_fee": "0.9800",
"closed_fee": "0.0000",
"expired_fee": "0.0000",
"remaining_potential_fee": "0.0000",
"max_potential_fee": "0.0000",
"points": 2.32
}
]
}
]

One frame per trade, not a batch, including trades that just transitioned to settled or cancelled, so clients can drop them from their active view. An order that sweeps several resting orders therefore produces several frames.

[null, null, "fills:e6528824-b4e0-4ff8-bd70-36e5904738d1", "trade", Fill]
[
null,
null,
"fills:e6528824-b4e0-4ff8-bd70-36e5904738d1",
"trade",
{
"id": "fc70fdcf-5e30-49bc-97a5-cbddeab025f5",
"market_id": "fd6a5668-ffda-4f97-b8fe-7aa6d79d9c5f",
"order_id": "1dc6ad2a-bd60-42b9-8ac3-7dd28d0eaf2b",
"client_order_id": "my-order-000",
"liquidity_action": "taker",
"device_id": null,
"ip_address": "203.0.113.42",
"status": "settled",
"time": "2026-10-09T23:41:17.631380Z",
"inserted_at": 1791589277631380,
"settled_at": "2026-10-10T01:45:58.350791Z",
"expires_at": 1823140799999999,
"amended": false,
"settlements_count": 1,
"action": "buy",
"filled": "50.00",
"remaining": "0.00",
"closing": "0.00",
"closed_contracts": "0.00",
"expired_contracts": "50.00",
"price": "0.3600",
"premium": "-18.0000",
"pc_premium": "-0.3600",
"pc_risk": "0.3600",
"pc_to_win": "0.6400",
"remaining_premium": "0.0000",
"remaining_risk": "0.0000",
"remaining_to_win": "0.0000",
"original_premium": "-18.0000",
"original_risk": "18.0000",
"original_to_win": "32.0000",
"gross_pnl": "32.0000",
"closed_pnl": "0.0000",
"expired_pnl": "32.0000",
"trade_fee": "1.1600",
"total_fee": "1.1600",
"closed_fee": "0.0000",
"expired_fee": "0.0000",
"remaining_potential_fee": "0.0000",
"max_potential_fee": "0.0000",
"points": 1.8
}
]

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