Skip to content

Channel

Describes stx-python 0.10.1, the current release.

One joined topic.

Attribute Type Description
reply Dict[str, Any]
snapshots Dict[str, Any]
watches List[str]
join_ref Optional[str]
leave() -> None

Leave the topic. The channel stops receiving and its iterator ends.

next(timeout: Optional[float] = None) -> ChannelMessage

The next message on this channel. Raises asyncio.TimeoutError.

Parameter Type Description
timeout Optional[float]
ping() -> Any

Channel ping. On orders with cancel-on-disconnect armed this resets the cancel deadline; on account and orders it keeps the session alive.

push(event: str, payload: Any = None, timeout: Optional[float] = None) -> Any

Send event on this channel and return the reply’s response.

Raises STXChannelException when the reply status is error.

Parameter Type Description
event str
payload Any
timeout Optional[float]
request_series(market_ids: Sequence[str], range: str = 'all') -> Any

market_stats: fetch history at range (day, week, month, all) without changing the subscription.

Parameter Type Description
market_ids Sequence[str]
range str
request_snapshot() -> Any

market:<id>: ask for the market’s current state again; it arrives as a push on this channel.

select_filters(**filters: Optional[Sequence[str]]) -> Any

ticker (sports, competitions) and trades (market_ids, event_ids): change filters without rejoining.

Parameter Type Description
filters Optional[Sequence[str]]
select_market_ids(market_ids: Optional[Sequence[str]]) -> Any

Change the market_ids filter without rejoining.

On orders, fills, positions, settlements and account None clears the filter; orderbook and market_stats require at least one id. Returns the reply, whose selected_market_ids is what the server applied.

Parameter Type Description
market_ids Optional[Sequence[str]]
select_message_types(message_types: Optional[Sequence[str]]) -> Any

markets: receive market_created, market_updated or both.

Parameter Type Description
message_types Optional[Sequence[str]]
select_rule_filters(rule_filters: Optional[Sequence[str]]) -> Any

markets: change the rules filter; None disables it.

Parameter Type Description
rule_filters Optional[Sequence[str]]
wait_snapshot(timeout: Optional[float] = 10.0) -> Dict[str, Any]

Wait for the state-on-join and return it as {event: payload}.

orders gives {"all_orders": {...}}; account waits for all four of its snapshots. market_stats and market:<id> return {"reply": <join reply>}: the series, or the market in full. Channels with no snapshot (settlements, ticker, trades, orderbook, markets, market_updates) raise ValueError.

Parameter Type Description
timeout Optional[float]
watch(market_ids: Sequence[str]) -> Any

market_updates: start receiving created/updated for these markets. Re-sent automatically after a reconnect. Returns the reply, whose subscriptions.watches lists what is watched.

Parameter Type Description
market_ids Sequence[str]

One pushed frame.

payload is the event’s JSON object as documented for the channel, with money and quantities as strings. channel is the topic without the user id ("orders" for orders:<user_id>). data is the payload as a typed model on the combo channels, and None elsewhere.

Attribute Type Description
topic str
event str
payload Any
ref Optional[str]
join_ref Optional[str]
data Any
channel str
is_snapshot bool True for the state-on-join events (all_orders, balances…).

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