↑ ↓ move · Enter open · Esc close

WebSockets / Channels / Polymarket Reference

Polymarket Reference

WS·polymarket_reference·Dev Tier+·Polymarket

Live Chainlink USD prices for the crypto assets behind Polymarket's up/down markets, including BTC, ETH, SOL, XRP, DOGE, BNB and HYPE. These are the prices those markets settle on, separate from YES contract prices.

Overview

Use case: Compare the live Chainlink price with a Polymarket up/down window's price to beat while tracking contract quotes on prices.

Requirements

  • Uses your existing prices entitlement on Dev, Pro, and Enterprise. Subscribe once with no market_ids, group_ids, or event_ids. Each update identifies its index_id (for example btc/usd); filter locally for the symbols you need.
  • Each symbol updates about once per second. This is an event-driven feed, not a fixed timer; do not interpolate missing values or assume every second produces a value.
  • Wait for POLYMARKET_STREAM_READY, then use the next index_value. POLYMARKET_STREAM_INTERRUPTED means the previous value is stale. Updates are live only; there is no initial snapshot or replay.
  • The value is a decimal string in USD, not a contract probability. source_ts_ms is the Chainlink timestamp; the outer ts is Prediction.com delivery time. Compare source timestamps to reject older values.
  • A slow consumer is disconnected with code 1013. Reconnect and resubscribe, then wait for a fresh value. Unsubscribe with no IDs to stop the feed.

Send

FieldTypeRequiredNotes
actionstringyesMust be "subscribe" for this section.
channelstringyesMust be "polymarket_reference".
market_idsstring[]unsupportedDo not send. Filter index_id in received messages.
group_idsnumber[]unsupportedDo not send.
event_idsnumber[]unsupportedDo not send.
wildcardbehaviorfixedNo IDs: receive all available reference index values.

Receive

Data messages use the standard envelope: channel, type, ts, data. Types for this channel include: index_value.

Subscribe with {"action":"subscribe","channel":"polymarket_reference"}. For a Polymarket Bitcoin up/down window, filter to index_id=btc/usd and compare it with the window's price to beat: the window resolves Up when the Chainlink price at its end is at or above the price at its start. Kalshi's equivalent windows settle on CF Benchmarks' BRTI on kalshi_reference, so the two can resolve differently when the price barely moves.

Data fields (inside data)

FieldTypeDescription
typestringindex_value
index_idstringLowercase symbol pair, for example btc/usd, eth/usd, sol/usd, or xrp/usd.
value_usdstringCurrent Chainlink price in USD as a decimal string.
source_ts_msintegerChainlink price timestamp in Unix milliseconds.
sourcestringchainlink