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 |
json
{
"event_type": "book",
"asset_id": "65818619657568813474341868652308942079804919287380422192892211131408793125422",
"market": "0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
"bids": [
{ "price": ".48", "size": "30" },
{ "price": ".49", "size": "20" },
{ "price": ".50", "size": "15" }
],
"asks": [
{ "price": ".52", "size": "25" },
{ "price": ".53", "size": "60" },
{ "price": ".54", "size": "10" }
],
"timestamp": "123456789000",
"hash": "0x0...."
}