The Unified Trading Account
One balance sheet across every connected venue — aggregate positions, cash, and buying power in a single book.
The Unified Trading Account (UTA) collapses every connected venue into a single, consistent book so the agent — and you — always work from the same source of truth.
One book, many venues
When you run qoc connect <venue>, Qoc pulls that venue's positions, open orders, and available cash into the UTA. From that point on, every query — portfolio value, buying power, net exposure — is answered from the aggregated book, not from any single venue's API in isolation.
The UTA does not commingle funds or move money between venues. It is a read-aggregated, write-routed view: reads come from the local snapshot, writes (orders) are routed to the specific venue the asset lives on.
What the UTA tracks
| Dimension | Description |
|---|---|
| Positions | All open lots across every connected venue, normalized to a common schema. |
| Cash balances | Per-venue cash, plus the rolled-up total available for new orders. |
| Buying power | Computed from cash, margin, and open order holds; updated on every snapshot. |
| Open orders | Pending orders on any venue, visible in a single orders/ directory. |
| Unrealized P&L | Mark-to-market gain/loss per lot, summed across the whole book. |
Buying power calculation
Buying power is the UTA's central liquidity figure. It starts with settled cash across all venues, subtracts the notional value of open order holds, and — where a venue supports margin — adds available margin credit.
Because buying power is computed locally from the latest snapshot, it may lag real-time venue state by the snapshot interval (default: 60 seconds, configurable in desk.toml). For latency-sensitive strategies, lower the interval or call qoc snapshot before submitting a large order.
Snapshot interval configuration
[uta]
# How often Qoc pulls a fresh snapshot from all venues, in seconds.
snapshot_interval = 30
# Venues are snapshotted in parallel; timeout per venue in seconds.
snapshot_timeout = 10Venue-reported vs UTA buying power
A venue's own reported buying power may differ from the UTA figure because the UTA deducts open order holds across all venues simultaneously. Always use the UTA figure when the agent is evaluating whether to place a trade.
Trading against the whole book
When the agent evaluates a trade proposal, it reads buying power and existing exposure from the UTA. Guards (pre-trade risk rules) also operate on the UTA view, so a concentration limit applies to the total position across all venues, not just the venue the new order would land on.
This makes cross-venue risk consistent: you cannot accidentally exceed a single-name limit by splitting a position across two brokers.
Check the UTA at any time
Run qoc status to print the current UTA summary: total equity, buying power, open order count, and a per-venue breakdown. No network call is made — it reads the latest local snapshot.