stream_orderbook
Stream real-time orderbook snapshots for any prediction market via WebSocket, returning bids, asks, spread, and per-side details using the market slug.
Instructions
Get a real-time orderbook snapshot for a market via WebSocket. Faster than on-chain reads (~5s vs ~10s). Returns the same full processed snapshot shape as get_full_orderbook, with bids, asks, spread, and per-side YES/NO detail. Requires the market slug (URL-friendly name), not the market app ID.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"slug": "<slug>"
},
"name": "stream_orderbook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The market slug (URL-friendly name, e.g. "will-btc-hit-100k") | |
| timeoutMs | No | Max time to wait for a snapshot in ms (default: 15000) |