Migrate an API Integration
Update the connection, authentication, and subscription frames. See the Live Data Channel for the full protocol.What Changes
Topic Mapping
Live price payloads contain
symbol, value, full_accuracy_value, and
timestamp. Equity updates may also include received_at and
is_carried_forward. TWAP uses window_seconds. Prefer the exact decimal
full_accuracy_value over the float value. Legacy TWAP frames used
window_s and an E18 fixed-point price. Do not apply that E18 conversion to
PolyBolt’s decimal string.
Before and After
RTDS
PolyBolt
Client Checklist
- Point at
wss://ws-live-v2.polymarket.com/wsand delete thePINGtext heartbeat. - Send
{"op":"auth", ...}with CLOB API credentials before subscribing to price channels. - Batch subscriptions per connection. Stay at or below 64 active pairs.
- Seed local state from the snapshot, then apply live updates. Compare
seqonly within the same connection and channel. - Handle
4003with one jittered reconnect,4008as a bug, and resubscribe after every reconnect.
Comments Retirement
The live comments stream is being retired without a replacement streaming channel. See Comments for supported comment-listing options.Activity on RTDS
Keep using RTDS for theactivity topic. It has no PolyBolt channel.
Migrate SDKs to PolyBolt
Migrate a 60-Second TWAP Subscription
- TypeScript
- Python
PolyBolt support starts in
The new crypto topics require explicit lowercase USD symbols such as
@polymarket/client version 0.11.0.
Migrate a BTC/USD 60-second TWAP subscription with createSecureClient. Deprecated RTDS price topics are planned for removal one month after the 0.11.0 release.Before: RTDS
Before: RTDS
1
Create an Authenticated Client
Set
POLYMARKET_PRIVATE_KEY. This example uses the signer’s EOA address and the default production configuration.2
Subscribe to Prices
Change the topic from
Returned events still include
prices.crypto.chainlink.twap to prices.crypto.twap and provide an explicit symbols list. Change btc/usd to btcusd and remove windowSeconds from the subscription input. The new topic always uses a 60-second window.Output: CryptoTwapPriceEvent
Output: CryptoTwapPriceEvent
events: CryptoTwapPriceEvent[]
windowSeconds: 60. There is no PolyBolt replacement for the deprecated 30-second TWAP workflow.subscribe() waits for server acceptance. Snapshot events provide payload.data for initialization. Updates retain symbol, timestamp, decimal-string value, and windowSeconds.btcusd. Inputs such as btc/usd, btcusdt, and BTCUSD fail with UserInputError. The SDK does not rewrite them.Migrate Crypto Spot Prices
- TypeScript
- Python
Use the authenticated
Replace the legacy subscription with:
client created above. Change the symbol suffix from usdt to usd, for example btcusdt to btcusd. Remove any slash separators, for example btc/usd to btcusd. The new topic requires explicit lowercase USD symbols.The prices.crypto topic uses Pyth prices, so migrating from Binance or Chainlink spot prices changes the data source. Migrating from Binance also changes the quote currency from USDT to USD. Confirm that the new feed meets your pricing requirements before switching.Before: RTDS
Before: RTDS
Output: CryptoPriceEvent
Output: CryptoPriceEvent
events: CryptoPriceEvent[]
Migrate Equity Prices
- TypeScript
- Python
Use the authenticated
Replace the legacy subscription with:
client created above. Preserve symbol and types when changing the topic.Before: RTDS
Before: RTDS
Output: EquityPriceEvent
Output: EquityPriceEvent
events: EquityPriceEvent[]
types: ["update"] keeps this stream limited to live updates. Omit types to receive history snapshots too.