Polymarket data API
Polymarket Data API
One API for Polymarket depth: JSON over REST with a Bearer key for stored history, plus normalized current-book updates over WebSocket. Exact envelopes and timestamps are documented per surface.
The DepthFeed Polymarket data API returns market discovery, metadata, and full-depth stored observations through REST. WebSocket publishes normalized live-book frames. Both are plain JSON, but clients should follow their documented contracts rather than assume byte-for-byte identical objects.
Polymarket data API at a glance
- Protocol
- JSON over HTTPS — REST + WebSocket
- Auth
- Bearer / X-API-Key (or ?api_key= on WS)
- Discovery
- Markets → snapshots → live /v3/stream
- Agent-ready
- No SDK; MCP / function-calling friendly
- Assets
- 7 — BTC · ETH · SOL · XRP · DOGE · BNB · HYPE
- Timestamps
- Millisecond observation time; venue-specific source stamps
- Underlying price
- Nearest preceding Binance reference when available
- History
- 7/30/90-day windows + full archive (Desk)
- Delivery
- REST history + normalized live WebSocket frames
- Resolution
- Raw stored observations or ?interval= 1s–1d
Discover a Polymarket market, then pull its history
Start with discovery so the market identifier and metadata remain attached to the request. The snapshot route returns recorded observations; include_orderbook exposes the stored ladder and interval selects one recorded row per bucket.
curl -s "https://api.depthfeed.com/v3/btc/markets?limit=5" \
-H "Authorization: Bearer df_your_key"
curl -s "https://api.depthfeed.com/v3/btc/markets/<market_id>/snapshots?include_orderbook=true&interval=1m" \
-H "Authorization: Bearer df_your_key"- Omit interval for raw stored resolution; downsampling selects a recorded observation and does not interpolate a missing book.
- Follow the response cursor for the next page instead of constructing offset pagination.
Polymarket data API
What the API gives you
REST for history, WebSocket for current books
Discover markets, then pull full-depth observations over REST. The live stream (wss://api.depthfeed.com/v3/stream) publishes normalized current-book frames. Shared book fields ease integration, while venue-specific identifiers, timestamps, and response envelopes remain explicit.
Built for automation and agents
The API is plain JSON with one Bearer key (or X-API-Key), so it needs no SDK and drops straight into any function-calling or MCP-style tool definition. The WebSocket protocol is three JSON ops (subscribe / unsubscribe / ping), with ?api_key= auth where headers can't be set. Errors use a stable code enum you can branch on (AUTH_INVALID, COIN_NOT_IN_PLAN, RATE_LIMIT_BURST, …).
Metered, paginated, and tunable
Keyset pagination, general REST admission, and separate historical-workload controls keep large pulls predictable. Choose the stored resolution or add ?interval= from 1s through 1d to select one recorded observation per bucket. The endpoint does not interpolate rows that were never captured.
Make one authenticated request
Create a free key, discover a venue-native market identifier and pull a bounded full-depth response before building the ingestion loop.
