<wss-channel> market
book message
Emitted when:- First subscribed to a market.
- A trade or order update affects the book.
Structure
| Name | Type | Description |
|---|---|---|
event_type | string | book. |
asset_id | string | Asset ID (token ID). |
market | string | Condition ID of the market. |
timestamp | string | Unix timestamp in milliseconds. |
hash | string | Hash summary of the order book content. |
bids | OrderSummary[] | Aggregate bid levels (price, size). |
asks | OrderSummary[] | Aggregate ask levels (price, size). |
OrderSummary object is of the form:
| Name | Type | Description |
|---|---|---|
price | string | Price level. |
size | string | Size available at the price level. |
price_change message
Emitted when:- A new order is placed.
- An order is canceled.
Structure
| Name | Type | Description |
|---|---|---|
event_type | string | price_change. |
market | string | Condition ID of the market. |
price_changes | PriceChange[] | Array of price change objects. |
timestamp | string | Unix timestamp in milliseconds. |
PriceChange object is of the form:
| Name | Type | Description |
|---|---|---|
asset_id | string | Asset ID (token ID). |
price | string | Price level affected. |
size | string | New aggregate size for the price level. |
side | string | BUY or SELL. |
hash | string | Internal order ID that triggered the change. |
best_bid | string | Current best bid price. |
best_ask | string | Current best ask price. |
tick_size_change message
Emitted when:- The minimum tick size of the market changes.
Structure
| Name | Type | Description |
|---|---|---|
event_type | string | tick_size_change. |
asset_id | string | Asset ID (token ID). |
market | string | Condition ID of the market. |
old_tick_size | string | Previous minimum tick size. |
new_tick_size | string | Current minimum tick size. |
side | string | Side that triggered the change. |
timestamp | string | Time of the event. |
last_trade_price message
Emitted when a maker and taker order is matched and produces a trade.| Name | Type | Description |
|---|---|---|
asset_id | string | Asset ID (token ID). |
event_type | string | last_trade_price. |
market | string | Condition ID of the market. |
price | string | Trade price. |
side | string | BUY or SELL. |
size | string | Trade size. |
fee_rate_bps | string | Fee rate in bps. |
timestamp | string | Unix timestamp in milliseconds. |
best_bid_ask message
Emitted when the best bid and ask prices for a market change. This message requirescustom_feature_enabled: true at subscription time.
Structure
| Name | Type | Description |
|---|---|---|
event_type | string | best_bid_ask. |
market | string | Condition ID of the market. |
asset_id | string | Asset ID (token ID). |
best_bid | string | Current best bid price. |
best_ask | string | Current best ask price. |
spread | string | Spread between best bid and ask. |
timestamp | string | Unix timestamp in milliseconds. |
new_market message
Emitted when new market metadata is ingested. This message requirescustom_feature_enabled: true at subscription time.
Delivery follows the market-channel filter: the payload is sent only if the subscriber is listening to at least one asset_id listed in assets_ids.
Structure
| Name | Type | Description |
|---|---|---|
event_type | string | new_market. |
id | string | Market identifier (from metadata). |
question | string | Market question or name. |
market | string | Condition ID of the market. |
slug | string | Market slug. |
description | string | Market rules/description. |
assets_ids | string[] | Asset IDs (token IDs) for the market. |
outcomes | string[] | Outcome labels. |
event_message | object | Event context for the market. |
timestamp | string | Unix timestamp in milliseconds. |
event_message object is of the form:
| Name | Type | Description |
|---|---|---|
id | string | Event identifier (from metadata). |
ticker | string | Event ticker/short label. |
slug | string | Event slug. |
title | string | Event title. |
description | string | Event description. |
Notes
- All numeric values are strings.
book.hashusessha1(orderbook_summary_json)with the hash field zeroed (40 hex chars, no0x).price_change.hashcurrently uses the internal order ULID.market_resolvedis planned (requirescustom_feature_enabled).- Expected fields:
event_type,id,question,market,slug,description,assets_ids,winning_asset_id,winning_outcome,event_message { id, ticker, slug, title, description },timestamp.