Websocket
Market Channel
Public channel for updates related to market updates (level 2 price data).
SUBSCRIBE
<wss-channel> market
Book Message
Emitted When:
- First subscribed to a market/
- When there is a trade that affects the book
Structure
Name | Type | Description |
---|---|---|
event_type | string | ”book” |
asset_id | string | asset ID (token ID) |
market | string | condition ID of market |
timestamp | string | unix timestamp the current book generation in milliseconds (1/1,000 second) |
hash | string | hash summary of the orderbook content |
buys | OrderSummary[] | list of type (size, price) aggregate book levels for buys |
sells | OrderSummary[] | list of type (size, price) aggregate book levels for sells |
Where a OrderSummary
object is of the form:
Name | Type | Description |
---|---|---|
price | string | size available at that price level |
size | string | price of the orderbook level |
Response
Price_change Message
Emitted When:
- A new order is placed
- An order is cancelled
Structure
Name | Type | Description |
---|---|---|
event_type | string | ”price_change” |
asset_id | string | asset ID (token ID) |
market | string | condition ID of market |
price | string | price level affected |
size | string | new aggregate size for price level |
side | string | buy/sell |
timestamp | string | time of event |
Response
Tick_size_change Message
Emitted When:
- The minimum tick size of the market changes. This happens when the book’s price reaches the limits: price > 0.96 or price < 0.04
Structure
Name | Type | Description |
---|---|---|
event_type | string | ”price_change” |
asset_id | string | asset ID (token ID) |
market | string | condition ID of market |
old_tick_size | string | previous minimum tick size |
new_tick_size | string | current minimum tick size |
side | string | buy/sell |
timestamp | string | time of event |
Response