Overview
Themarket channel allows you to receive real-time updates about one or more specific markets. You can choose to receive orderbook updates, trades, or both.
Authentication
Themarket channel does not require authentication. You can subscribe without providing an API key.
Subscribe
To subscribe to the market channel:Requirements
markets(required): Array of market IDsfilter(optional): Desired update type""or"all": All updates (default)"orderbook": Only orderbook updates"trades": Only trade updates
Examples
Receive All Updates
Receive Only Orderbook
Receive Only Trades
Received Messages
Orderbook Update
Received when there are changes to a market’s orderbook (whenfilter is "orderbook" or "all").
Structure:
New Trade
Received when a new trade is executed on a market (whenfilter is "trades" or "all").
Structure:
Complete Update
Received when there are general updates to the market (whenfilter is "all" or not specified).
Structure:
Usage Example
Unsubscribe
To unsubscribe from specific markets:Orderbook Fields
See the complete orderbook documentation for details about the returned fields.Main Fields
market_price_yes: Current market price for YES in ticks (0-100);market_price_no: Current market price for NO in ticks (0-100);chance: YES probability in percentage (0-100);volume: Total contracts created (historical trades);liquidity: Total contracts available in the orderbook;spread_yes: Spread for YES in ticks;spread_no: Spread for NO in ticks.
Use Cases
- Price Monitoring: Use with
orderbookfilter to receive real-time price updates; - Liquidity Analysis: Monitor orderbook depth to assess liquidity;
- Trade Tracking: Use with
tradesfilter to monitor trading activity; - Price Alerts: Set up alerts when prices reach certain levels;
- Market Making: Use orderbook updates to adjust your limit orders.
Best Practices
- Use Filters: If you only need orderbook or trades, use the appropriate filter to reduce traffic;
- Multiple Markets: You can subscribe to multiple markets on the same connection;
- State Management: Keep local orderbook state and update as messages arrive;
- Market Identification: Always check the
market_idin messages to ensure you’re processing the correct market.

