WebSocket is async-only. Use
asyncio.run() or AsyncPolymarketUS.Methods
private
Connect to the private WebSocket for real-time order, position, and balance updates.Private Subscription Types
Private Events
markets
Connect to the markets WebSocket for real-time market data and trades.Market Subscription Types
Market Events
Best Practices
- Use unique request IDs - Track subscriptions with unique identifiers
- Handle reconnection - Implement automatic reconnection with exponential backoff
- Process messages in order - Messages are delivered in sequence
- Limit subscriptions - Only subscribe to markets you need