Polymarket provides a Typescript client for interacting with this streaming service. Download and view it’s documentation here
Overview
The crypto prices subscription provides real-time updates for cryptocurrency price data from two different sources:- Binance Source (
crypto_prices
): Real-time price data from Binance exchange - Chainlink Source (
crypto_prices_chainlink
): Price data from Chainlink oracle networks
Binance Source (crypto_prices
)
Subscription Details
- Topic:
crypto_prices
- Type:
update
- Authentication: Not required
- Filters: Optional (specific symbols can be filtered)
- Symbol Format: Lowercase concatenated pairs (e.g.,
solusdt
,btcusdt
)
Subscription Message
With Symbol Filter
To subscribe to specific cryptocurrency symbols, include a filters parameter:Chainlink Source (crypto_prices_chainlink
)
Subscription Details
- Topic:
crypto_prices_chainlink
- Type:
*
(all types) - Authentication: Not required
- Filters: Optional (JSON object with symbol specification)
- Symbol Format: Slash-separated pairs (e.g.,
eth/usd
,btc/usd
)
Subscription Message
With Symbol Filter
To subscribe to specific cryptocurrency symbols, include a JSON filters parameter:Message Format
Binance Source Message Format
When subscribed to Binance crypto prices (crypto_prices
), you’ll receive messages with the following structure:
Chainlink Source Message Format
When subscribed to Chainlink crypto prices (crypto_prices_chainlink
), you’ll receive messages with the following structure:
Payload Fields
Field | Type | Description |
---|---|---|
symbol | string | Trading pair symbol Binance: lowercase concatenated (e.g., “solusdt”, “btcusdt”) Chainlink: slash-separated (e.g., “eth/usd”, “btc/usd”) |
timestamp | number | Price timestamp in Unix milliseconds |
value | number | Current price value in the quote currency |
Example Messages
Binance Source Examples
Solana Price Update (Binance)
Bitcoin Price Update (Binance)
Chainlink Source Examples
Ethereum Price Update (Chainlink)
Bitcoin Price Update (Chainlink)
Supported Symbols
Binance Source Symbols
The Binance source supports various cryptocurrency trading pairs using lowercase concatenated format:btcusdt
- Bitcoin to USDTethusdt
- Ethereum to USDTsolusdt
- Solana to USDTxrpusdt
- XRP to USDT
Chainlink Source Symbols
The Chainlink source supports cryptocurrency trading pairs using slash-separated format:btc/usd
- Bitcoin to USDeth/usd
- Ethereum to USDsol/usd
- Solana to USDxrp/usd
- XRP to USD
Notes
General
- Price updates are sent as market prices change
- The timestamp in the payload represents when the price was recorded
- The outer timestamp represents when the message was sent via WebSocket
- No authentication is required for crypto price data