A tool that watches many markets can poll an API again and again, or it can subscribe to a stream. Polymarket documents a market WebSocket channel for the second approach. This article summarises what the documentation says, and what it means for a bot that compares prices with Kalshi. It is not trading advice, and the details can change, so check the current documentation. The documentation currently shows more than one message layout, so test against live messages before you rely on a field name.
Subscribing
The subscription request carries assets_ids (the token IDs), a type that must be market, an optional initial_dump (whether to send an initial order book snapshot; default true), a subscription level (default 2) and a custom_feature_enabled flag. A separate message subscribes or unsubscribes to assets without reconnecting.
Events
The channel documents these events: book (order book snapshot), price_change (order book level changes, with price, size, side and the best bid and ask), last_trade_price, tick_size_change, best_bid_ask (documented as requiring custom_feature_enabled: true), new_market and market_resolved.
Keeping the connection alive
The documentation says to send PING every 10 seconds, and the server answers with a pong. A silent connection is not proof of a quiet market: a bot should track when it last received a message and reconnect and re-sync from a snapshot if the stream goes quiet.
Streams and fresh prices
An arbitrage compares two prices that must be fresh at the same moment, so the age of each price matters as much as its value. A stream can keep the Polymarket side up to date between full refreshes, but it does not help with the Kalshi side, which has its own rate limits. See also the Polymarket API guide.
Where Arbitrage Agent fits
Arbitrage Agent matches markets across Kalshi and Polymarket, checks the resolution rules on both sides, and shows the result in a live feed with a step-by-step guide for both legs. You place the orders yourself, and the final check of the details is still yours. See the plans or start with the Starter plan.
Related articles
- Polymarket API Guide
- Kalshi API Rate Limits
- Execution Speed in Prediction Market Arbitrage
- Polymarket Trading Bot Guide
Key terms: Spread · Event Contract