Hosted only — This method requires a PMXT API key and connects to the hosted WebSocket API at
wss://api.pmxt.dev/ws?apiKey=YOUR_KEY. Not available on the local server.SDK defaults depend on which client you instantiate.
Router streams all venues by default. Venue clients such as Kalshi, Polymarket, Limitless, and Opinion stream only their own venue by default. Pass an explicit venues list to override either default.Parameters
Available venues:
polymarket, kalshi, limitless, opinion.
Raw WebSocket subscriptions do not have an SDK client default. For raw WebSocket, connect to the WebSocket URL, send one JSON text frame, then read JSON text frames. Omit args to stream all venues, or send args: [["kalshi"]] to stream only Kalshi.
Response
Returns aFirehoseEvent object for each orderbook update in the selected stream:
Usage
All venues with Router
Raw WebSocket without an SDK
Use this when you are not using the Python or TypeScript SDKs, or when you are implementing the stream in Rust, Go, Java, or another WebSocket client.
This Python example does not use the PMXT SDK; it connects to the same raw WebSocket URL that a Rust or Go client would use.
raw-watch-all-order-books.py

