diff --git a/pages/benchmarks/index.mdx b/pages/benchmarks/index.mdx index 314442b9..ae340d55 100644 --- a/pages/benchmarks/index.mdx +++ b/pages/benchmarks/index.mdx @@ -18,10 +18,10 @@ Technically, each displayed price corresponds to the Pyth price update published ## On-Chain Contracts -On-chain contracts can consume benchmark prices using the same pull model as [Pythnet Price Feeds](pythnet-price-feeds.md). +On-chain contracts can consume benchmark prices using the same pull model as [Pythnet Price Feeds](../price-feeds/price-feed-ids.mdx). Integrators can follow these three steps: -1. Use the [Hermes](pythnet-price-feeds/hermes) endpoint `/api/get_vaa` to retrieve a signed price update for the desired price feed and time. +1. Use the [Hermes](pythnet-price-feeds/hermes) endpoint `/v2/updates/price/{price_time}` to retrieve a signed price update for the desired price feed and time. This endpoint will return a signed price update, specifically the price update immediately after the queried time. This step can be done in either a web frontend or a backend process, depending on who is expected to initiate the transaction. 2. Pass this price update to your on-chain contract as part of the transaction that needs the benchmark data. @@ -30,7 +30,7 @@ Integrators can follow these three steps: The price update will only be valid if the signatures are correct and the update falls within a user-configured time interval; integrators should set this time interval such that it matches their desired time. Note that this process is similar to the standard process for consuming pull updates. -The main differences are that users call the `get_vaa` endpoint instead of `latest_vaas`, and the on-chain contract calls `parsePriceFeedUpdates` instead of `updatePriceFeeds`. +The main differences are that users call the `/v2/updates/price/{price_time}` endpoint instead of `/v2/updates/price/latest`, and the on-chain contract calls `parsePriceFeedUpdates` instead of `updatePriceFeeds`. The pyth-crosschain repo has [example code](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/js/src/examples/EvmBenchmark.ts) for an integration along the lines above for EVM chains. ## API Documentation