Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Real-time market data via WebSocket.
wss://api.arbiterapi.com/v1/ws?api_key=YOUR_API_KEY
{ "subscribe": "trades", "market_id": "poly_0x24fb..." }
trades
prices
orderbook
{ "subscribe": "trades", "market_id": "*" }
{ "type": "trade", "market_id": "poly_0x24fb...", "platform": "polymarket", "price": 0.55, "size": 100.0, "side": "buy", "timestamp_ms": 1774399231269 }
{ "type": "price", "market_id": "poly_0x24fb...", "platform": "polymarket", "price": 0.56, "timestamp_ms": 1774399231500 }
{ "unsubscribe": "trades", "market_id": "poly_0x24fb..." }
import WebSocket from 'ws'; const ws = new WebSocket('wss://api.arbiterapi.com/v1/ws?api_key=YOUR_KEY'); ws.on('open', () => { ws.send(JSON.stringify({ subscribe: 'trades', market_id: '*' })); }); ws.on('message', (data) => { const event = JSON.parse(data.toString()); console.log(`${event.market_id}: ${event.price} (${event.side})`); });
import asyncio import websockets import json async def stream(): uri = "wss://api.arbiterapi.com/v1/ws?api_key=YOUR_KEY" async with websockets.connect(uri) as ws: await ws.send(json.dumps({ "subscribe": "trades", "market_id": "*" })) async for msg in ws: event = json.loads(msg) print(f"{event['market_id']}: {event['price']} ({event['side']})") asyncio.run(stream())