Install
Public surface
Importable fromopenpx:
Exchange
fetch_markets, fetch_trades, and fetch_orderbook_history return a dict
with the items list under its plural name and a cursor key.
All methods are synchronous. The Rust engine runs the underlying async
work on its own runtime; the binding blocks the calling Python thread.
WebSocket
updates() and session_events() are take-once; calling either twice
raises.
Models
openpx._models exports auto-generated Pydantic types: Market, Order,
Fill, Position, Orderbook, OrderbookSnapshot, MarketTrade,
Candlestick, and friends. They mirror the Rust structs documented in the
unified schema.
Errors
CatchOpenPxError for everything; subclasses are NetworkError,
ExchangeError, and AuthenticationError.