NEW

CCIP is now live for all developers. See what's new.

Chainlink Data Streams

Chainlink Data Streams provides low-latency delivery of market data offchain that you can verify onchain. With Chainlink Data Streams, decentralized applications (dApps) now have on-demand access to high-frequency market data backed by decentralized, fault-tolerant, and transparent infrastructure.

Traditional push-based oracles provide regular updates onchain when certain price thresholds or update time periods have been met. Chainlink Data Streams is built using a new pull-based oracle design that maintains trust-minimization using onchain verification.

Comparison to push-based oracles

Chainlink's push-based oracles provide regular updates onchain. Chainlink Data Streams operates as a pull-based oracle where you can retrieve the data in a report and use it onchain any time. Verifying the report onchain confirms that the data was agreed upon and signed by the DON. While many applications benefit from push-based oracles and require data only after it has been verified onchain, some applications require access to data that is updated at a higher frequency and delivered with lower latency. Pull-based oracles deliver these benefits while still cryptographically signing the data to ensure its veracity.

Chainlink Data Streams - Push-Based vs Pull-Based Oracles

Additionally, pull-based oracles deliver data onchain more efficiently by retrieving and verifying the data only when the application needs it. For example, a decentralized exchange might retrieve a Data Streams report and verify the data onchain when a user executes a trade. A push-based oracle repeatedly delivers data onchain even when that data is not immediately required by users.

Comprehensive market insights

Chainlink Data Streams provides price points such as mid prices and Liquidity-Weighted Bid and Ask (LWBA) prices. LWBA prices adjust dynamically based on the current state of order books, which offers greater insights into market liquidity and depth. Liquidity-weighted prices enhance trading accuracy, improve risk management, and increase transactional efficiency as they dynamically reflect the true market conditions based on volume and liquidity.

High availability and resilient infrastructure

The Data Streams API services use an active-active multi-site deployment setup as a highly available and resilient architecture across multiple distributed and fully-isolated origins. This setup ensures that the services are operational even if one origin fails, which provides robust fault tolerance and high availability.

Use cases

Pull-based oracles allow decentralized applications to access data that is updated at a high frequency and delivered with low latency, which enables several new use cases:

  • Perpetual Futures: Low-latency data and frontrunning prevention enable onchain perpetual futures protocols that can compete on performance with centralized exchanges while still using more transparent and decentralized infrastructure.
  • Options: Pull-based oracles allow timely and precise settlement of options contracts. Additionally, Data Streams provides more detailed market liquidity data that can support dynamic onchain risk management logic.
  • Prediction Markets: Higher frequency data updates allow for applications where users can act quickly in response to real-time events and be confident in the accuracy of the data used in the settlement.

Data Streams implementations

When combined with Chainlink Automation, Chainlink Data Streams allows decentralized applications to automate trade execution, mitigate frontrunning, and limit bias or adverse incentives in executing non-user-triggered orders.

Chainlink Data Streams - Streams Trade Architecture

Read more about the Streams Trade Architecture and an example trading flow, or learn how to get started with Streams Trade.

Streams Direct: Using Data Streams with your own bot

Streams Direct offers a direct approach to integrating low-latency and high-frequency data into your applications. You can use an offchain API to fetch reports or a WebSocket connection to subscribe to report updates from the Data Streams Aggregation Network, and an onchain smart contract to verify reports.

For instance, you can use Chainlink Data Streams with the Streams Direct implementation to display indicative pricing offchain on your front end or with your bot to settle trades onchain.

On-demand offchain workflows

Chainlink Data Streams - Streams Direct On-Demand Offchain Workflows

Explore an example of offchain price updates through Streams Direct in the Architecture guide, or follow this guide to learn how to fetch and decode Data Streams reports using the Streams Direct API.

What's next

Stay updated on the latest Chainlink news