Exchange trait. You can trade on a single exchange or multiple exchanges simultaneously.
Verification Status
Different exchanges have received different levels of audit. Verification status below reflects how rigorously each backend has been compared against its reference implementation or live API behavior.
For live trading with real money, Polymarket is the only fully verified backend. The π‘ exchanges have all critical bugs fixed and should now work in principle, but have not been tested against real accounts. Test in paper or with small size first.
Prediction Markets
Paper
Local simulated exchange with tick-based matching. No credentials needed. Default for development.
Polymarket
Largest prediction market on Polygon. EIP-712 signed orders via the CLOB API.
Kalshi
US-regulated (CFTC) prediction market. REST API with bearer token auth.
Limitless
Base chain prediction market. REST client for on-chain trading.
Traditional & Crypto
Alpaca
Commission-free stock and ETF trading. Paper and live modes.
Coinbase
Crypto exchange with deep liquidity. HMAC-SHA256 auth via Advanced Trade API.
Robinhood
Commission-free crypto trading via REST API.
Hyperliquid
Decentralized perpetuals + spot on its own L1 chain. Wallet-based EIP-712 auth.
Interactive Brokers
Multi-asset broker: stocks, options, futures, and ForecastEx prediction markets. Bridges equities/options and prediction market trading.
Exchange Model
All exchanges implement a common trait:ExchangeBackend enum for dispatch without trait objects:
Single vs Multi-Exchange
Single exchange (default)
Multi-exchange
Fill Model
All exchanges use a pull model for fills:
The strategy loop calls
poll_fills() each cycle for live exchanges, and tick() for paper exchanges.
Order Routing
When you submit an order viahz.run(), itβs automatically routed to the correct exchange based on the market.exchange field:
- Markets resolved as
"polymarket"β routed to the Polymarket backend - Markets resolved as
"kalshi"β routed to the Kalshi backend - Markets with
"alpaca"β routed to the Alpaca backend - Markets with
"ibkr"β routed to the IBKR backend - Markets with
"coinbase"β routed to the Coinbase backend - Markets with
"robinhood"β routed to the Robinhood backend - Markets with
"hyperliquid"β routed to the Hyperliquid backend - Markets with
"paper"or empty exchange β routed to the primary exchange
Side Mapping
Exchange Fields on Types
Orders, Fills, and Positions all carry anexchange field indicating which exchange they belong to: