Room ID: polymarket_order_book
Endpoint: wss://api.struct.to/ws
Rate: 0.001 credits per message
Stream CLOB order book snapshots for specific markets or outcome positions. At least one filter is required. The combined total of condition_ids and position_ids must not exceed 500.
Subscribe
At least one of condition_ids or position_ids is required. Without any filters, the room will not emit events. You can combine both filters to narrow the stream.
Filters
| Filter | Type | Required | Description |
|---|
condition_ids | string[] | No | Markets to stream order books for |
position_ids | string[] | No | Outcome token IDs to stream order books for |
Example
{
"type": "join_room",
"payload": {
"room_id": "polymarket_order_book"
}
}
{
"type": "room_message",
"payload": {
"room_id": "polymarket_order_book",
"message": {
"action": "subscribe",
"condition_ids": ["0xabc123..."]
}
}
}
Response
{
"type": "order_book_stream_subscribe_response",
"room_id": "polymarket_order_book",
"data": {
"condition_ids": ["0xabc123..."],
"position_ids": [],
"rejected": []
}
}
Events
order_book_update
{
"type": "order_book_update",
"room_id": "polymarket_order_book",
"data": {
"asset_id": "12345678901234567",
"market": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"bids": [["0.60", "500"], ["0.59", "1200"], ["0.58", "3000"]],
"asks": [["0.61", "800"], ["0.62", "1500"], ["0.63", "2500"]],
"timestamp": 1743500000000,
"hash": "abc123def456",
"best_bid": 0.60,
"best_ask": 0.61,
"mid_price": 0.605,
"spread": 0.01,
"bid_liquidity_usd": 4500.0,
"ask_liquidity_usd": 5200.0,
"bid_levels": 3,
"ask_levels": 3
}
}