diff --git a/pages/price-feeds/getting-started.mdx b/pages/price-feeds/getting-started.mdx index 38e28508..ef96ef3c 100644 --- a/pages/price-feeds/getting-started.mdx +++ b/pages/price-feeds/getting-started.mdx @@ -12,6 +12,7 @@ Developers interested in using Pyth can refer to the following resources: - [Create Your First Pyth App](./create-your-first-pyth-app/) is a tutorial that walks the reader through all of the steps required to develop, test and deploy a contract using Pyth price feeds. This guide is tailored toward new developers with less contract development experience. - [Use Real-Time Price Data](./use-real-time-data/) is a how-to guide that provides the minimal steps to integrate price feeds into your app. This guide is targeted towards more experienced developers who know the basics of smart contract development. +- [Use Historic Price Data](./use-historic-price-data/) is a how-to guide that provides the minimal steps to integrate historic price data into your app. - [API Reference](./api-reference) is an interactive playground that provides a detailed overview of the Pyth smart contract's functionality. This guide is useful for developers who want to understand the full capabilities of the Pyth oracles. In addition to the resources above, the following reference materials will be useful for developers as they integrate: diff --git a/pages/price-feeds/use-historic-price-data.mdx b/pages/price-feeds/use-historic-price-data.mdx index d8155199..bf0d2db4 100644 --- a/pages/price-feeds/use-historic-price-data.mdx +++ b/pages/price-feeds/use-historic-price-data.mdx @@ -1,6 +1,6 @@ import { Callout, Steps } from "nextra/components"; -# Use Historic Price Data (Benchmarks) on EVM Chains +# Use Historic Price Data (Benchmarks) This guide shows you how to integrate **Pyth Benchmarks to access historical price data** for your applications. The Pyth Benchmarks API is available on all Pythnet chains. @@ -26,9 +26,9 @@ Pyth Benchmarks can be used in two ways to fetch historical prices: -### 1. Fetching Historical Prices +### 1. Fetching Historical Prices from Benchmarks API -Fetching historical prices from the Benchmarks API is the most straightforward way to get historical prices. +Fetching historical prices from the [Benchmarks API](https://benchmarks.pyth.network/docs#/Updates/price_updates_timestamp_route_v1_updates_price__timestamp__get) is the most straightforward way to get historical prices. Moreover, [Hermes also extends the Benchmarks API to allow you to fetch historical prices](https://hermes.pyth.network/docs/#/rest/timestamp_price_updates). Benchmarks APIs expose two endpoints to fetch historical prices: @@ -43,7 +43,7 @@ For example, if the timestamp is 1716400000 and the **interval is 60,** this fun -### Verifying Historical Prices on-chain +### 2. Verifying Historical Prices on EVM Chains Verifying Historical Prices on-chain is very similar to verifying real-time prices on-chain. After fetching the price updates in the previous step, you need to pass the price update to the [`parsePriceFeedUpdates`](https://api-reference.pyth.network/price-feeds/evm/parsePriceFeedUpdates) function on the Pyth contract instead of the [`updatePriceFeeds`](https://api-reference.pyth.network/price-feeds/evm/updatePriceFeeds) function. @@ -104,7 +104,7 @@ Refer to the [parsePriceFeedUpdates](https://api-reference.pyth.network/price-fe ### TradingView Integration -- [TradingView integration](../benchmarks/how-to-create-tradingview-charts) for visualization. +- [TradingView integration](../create-tradingview-charts) for visualization. ### Rate Limits