Skip to content

Balances Channel

Topic: balances:{user_id}

Delivers one account’s balance and fee summary as it changes, plus notifications about your payments. Money arrives as dollar strings; see Wire format.

This channel is scoped to an account rather than to markets, so it takes no market_ids filter. It takes an optional account_id instead.

  • account_id : The id of the account.
  • user_id : The id of the user that owns the account.
  • account_balance : The account’s cash balance. Unaffected by placing an order; not all of it may be available.
  • available_balance : The balance available to withdraw or place additional orders with.
  • buy_order_liability : The account’s total liability from buy orders, including the potential trade fee reserve.
  • sell_order_liability : The account’s total liability from sell orders, including the potential trade fee reserve.
  • position_premium_liability : The account’s total liability from position premiums. Routinely negative.
  • escrow : The account’s escrow balance.
  • total_deposits : The account’s total deposits.
  • total_withdrawals : The account’s total withdrawals.
  • total_adjustments : The account’s total balance adjustments.
  • total_settlement_pnl : Total gross profit and loss from all settlements.
  • total_fees : Total fees from all settlements and other fees.
  • total_trade_count : The number of trades the account has made across every market. An integer.
  • total_traded : The risk the account has committed across every market.
  • loyalty_tier : The tier the account is in, one of rookie, veteran, all_star, mvp or hall_of_fame. Every account has one; new accounts start at rookie.
  • points : Loyalty points the account has accumulated. A whole number, not a money string.
  • fee_schedule : The account’s fee schedule, one of fixed_percent, revenue_share, loyalty_tier, fixed_percent_market_group, fixed_percent_event, on_trade or loyalty_tier_on_trade. See Fees.
  • base_fee_percent : The fee percentage, when the account is on the fixed_percent schedule. Null for any other schedule. A number, not a money string.
  • taker_factor / maker_factor : Per-trade fee factors, present only for the on_trade and loyalty_tier_on_trade schedules. Null otherwise. Numbers, not money strings.
Use case Message to send
Join and receive the balance summary for your account ["3","3","balances:<user_id>","phx_join",{}]
Join for a specific account you own ["3","3","balances:<user_id>","phx_join",{"account_id":"<uuid>"}]
Check the connection is alive ["3","4","balances:<user_id>","ping",{}]
["3","3","balances:<user_id>","phx_join",{}]

The reply is empty; there is no filter to echo:

{"status":"ok","response":{}}

A user may hold more than one account. Omit account_id and you get the one the socket resolved when it connected; name one to reach another:

["3","3","balances:<user_id>","phx_join",{"account_id":"<uuid>"}]

GET /api/v1/me returns your account_id. An id belonging to another user (or one that is not a valid UUID) fails the join with unauthorized, which does not reveal whether the account exists:

{"status":"error","response":{"reason":"unauthorized"}}

If you join twice, once per account, each socket receives only its own account’s frames.

The join event is balances, and it carries the same object that later update frames carry.

[null, null, "balances:e6528824-b4e0-4ff8-bd70-36e5904738d1", "balances", Balances]
[
null,
null,
"balances:e6528824-b4e0-4ff8-bd70-36e5904738d1",
"balances",
{
"account_id": "28417940-ecef-40a9-8816-cc055d7d846f",
"user_id": "e6528824-b4e0-4ff8-bd70-36e5904738d1",
"account_balance": "804.8600",
"available_balance": "746.8600",
"buy_order_liability": "34.8000",
"sell_order_liability": "0.0000",
"position_premium_liability": "-23.2000",
"escrow": "0.0000",
"total_deposits": "1000.0000",
"total_withdrawals": "250.0000",
"total_adjustments": "25.0000",
"total_settlement_pnl": "32.0000",
"total_fees": "2.1400",
"total_trade_count": 2,
"total_traded": "41.2000",
"loyalty_tier": "rookie",
"points": 2,
"fee_schedule": "on_trade",
"base_fee_percent": null,
"taker_factor": 0.1,
"maker_factor": 0
}
]
[null, null, "balances:e6528824-b4e0-4ff8-bd70-36e5904738d1", "update", Balances]
[
null,
null,
"balances:e6528824-b4e0-4ff8-bd70-36e5904738d1",
"update",
{
"account_id": "28417940-ecef-40a9-8816-cc055d7d846f",
"user_id": "e6528824-b4e0-4ff8-bd70-36e5904738d1",
"account_balance": "804.1300",
"available_balance": "746.1300",
"buy_order_liability": "17.4000",
"sell_order_liability": "0.0000",
"position_premium_liability": "-40.6000",
"escrow": "0.0000",
"total_deposits": "1000.0000",
"total_withdrawals": "250.0000",
"total_adjustments": "25.0000",
"total_settlement_pnl": "32.0000",
"total_fees": "2.8700",
"total_trade_count": 3,
"total_traded": "58.6000",
"loyalty_tier": "rookie",
"points": 2,
"fee_schedule": "on_trade",
"base_fee_percent": null,
"taker_factor": 0.1,
"maker_factor": 0
}
]

Sent as your payments are processed.

  • id : The id of the payment.
  • account_id : The id of the account the payment is for.
  • provider : The name of the payment provider, e.g. paysafe.
  • provider_id : The transaction id from the provider.
  • status : pending_approval, initiated, received, pending, held, completed, failed or cancelled.
  • data : Provider-specific details about the payment. Shape varies by provider and payment method.
  • type : deposit, withdrawal or adjustment.
  • amount : The payment amount, as a dollar string.
[
null,
null,
"balances:e6528824-b4e0-4ff8-bd70-36e5904738d1",
"payment_update",
{
"id": "a2508f0c-2ace-4223-a0b2-f0bde966f94a",
"account_id": "28417940-ecef-40a9-8816-cc055d7d846f",
"provider": "paysafe",
"provider_id": "0dfdc53c-e2fc-4cd6-9b20-395f2dd64585",
"status": "completed",
"data": {
"handle": "SCtzjJMtI2CrWKSk",
"method": "card"
},
"type": "deposit",
"amount": "1000.0000"
}
]

Interac SendMoney deposits are not pushed at initiated or pending; the first frame you see for one is at a later status.

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