Chainlink Data Streams mainnet TWAP feeds are available now. You can use your
existing standard or sponsored Data Streams credentials. Polymarket RTDS is
scheduled to launch August 4, 2026.
Use Chainlink Data Streams
Use Chainlink Data Streams for direct mainnet access, the latest report before streaming, or the original signed report. Find an asset’sTWAP: 30s or TWAP: 60s ticker in the Chainlink Data Streams
catalog, then copy its feed ID. Run this only
on a trusted backend; never expose Chainlink credentials to browsers or mobile
apps.
1
Install and Connect
Use Node.js 20+ and TypeScript 5.3+. Install the Chainlink SDK:Create the mainnet client:The SDK signs each request. Keep the server clock within five seconds of
Chainlink’s server time.
2
Map and Decode Reports
Store the feed IDs from the catalog in server-side environment variables,
then map each ID to its asset and window. Preserve the signed E18 price
instead of converting it to a JavaScript
number:3
Fetch Latest TWAP
Fetch each feed’s latest report before streaming:
Output: Chainlink TWAP
Output: Chainlink TWAP
4
Stream Updates
Subscribe to the selected feed IDs:The SDK authenticates and reconnects automatically. Monitor
error,
disconnected, and reconnecting; restart the stream if retries are
exhausted.Read a Chainlink Report
The TWAP feeds use Chainlink report schema V2.decodeReport() exposes the
encoded benchmarkPrice as decoded.price.
Reports do not include symbol or window labels. Maintain that mapping yourself,
never infer the window from update frequency, and use
observationsTimestamp
for freshness checks.
decodeReport() parses the report fields; it does not verify the DON
signatures. Follow Chainlink’s verification requirements before using a report
for settlement or another trust-sensitive action.Find a Feed ID
Open the Chainlink Data Streams catalog and search for the asset and window you need, such asBTC / USD - TWAP: 30s or
BTC / USD - TWAP: 60s. Copy the feed ID from the product page and use it with
your existing standard or sponsored Data Streams credentials.
The 30-second and 60-second values are lookback windows, not publication
cadences. Chainlink computes and signs the TWAP. Define a freshness threshold
and a fallback for report gaps instead of trying to infer the calculation from
the incoming updates. Chainlink does not currently publish the custom feed’s
sampling boundaries, weighting, rounding, or missing-input behavior, so do not
independently reproduce the value without a specification from Chainlink.
For production requirements, see Chainlink’s TypeScript SDK
reference,
authentication
reference,
and developer
responsibilities.
Use Polymarket RTDS
RTDS is the recommended production integration. Starting August 4, 2026, it will relay Chainlink-computed mainnet TWAP updates without credentials. Use lowercase, slash-delimited symbols such asbtc/usd. Omit a symbol filter
to receive every available pair.
- TypeScript
- Python
- API
Requires Node.js 24+ and Matching bindings are included. See the TypeScript SDK
guide for general setup.Subscribe with an explicit window and any symbols you need:Set
@polymarket/client 0.3.0 or later:windowSeconds to 30 or 60. Omit symbols to receive every
available pair. The same subscription works with a SecureClient.Example output after RTDS activation
Example output after RTDS activation
payload.value is an exact decimal string derived from Chainlink’s
fixed-point value. Keep it as a decimal string instead of converting it to a
JavaScript number. Use payload.timestamp as the Chainlink observation
time; the outer timestamp is when the publisher submitted the update to
RTDS.Once accepted, the SDK restores the subscription after disconnects. It does
not retry a prelaunch rejection on an otherwise open socket.