Hey, I subscribed to the Pyth Terminal Starter plan a few days ago, but since upgrading, I have been unable to retrieve historical prices correctly through the authenticated v2 API.
For example, I request data for Unix timestamp 1717632000:
Instead of returning the price published around the requested timestamp, the response contains a recent publish time—approximately three hours before the request. For example, one response returned 1783937703. Each time I call the endpoint, the publish time changes while remaining roughly three hours behind the current time.
However, the unauthenticated v1 API returns the correct historical publish time for the same timestamp and price-feed ID:
Can you explain why the paid Starter plan’s v2 endpoint is not returning the requested historical price, while the v1 endpoint works correctly? Historical price access was one of the reasons I subscribed, so I would appreciate either instructions for the correct paid endpoint or confirmation that this is a bug that will be fixed.
I believe the information on the Preparing for the Pyth Core upgrade | Pyth Developer Hub page caused some confusion. It states that an API key will be required by July 31 and that using an API key requires upgrading to the Pyth Pro API. However, the page links to the older Pyth Core/Hermes documentation, which led me to believe that the API key and paid plan applied to those endpoints as well.
That is why I misunderstood how the paid API was intended to be used. It may be helpful to update the page or clarify the distinction between the older Hermes endpoints and the Pyth Pro API.
The API key requirement is for continuing historical price access through Pyth Pro. The older Pyth Core/Hermes historical endpoints are legacy and will be deprecated, so new integrations should use the Pyth Pro /v1/{channel}/price or /v1/{channel}/history endpoints instead.
Hey just want to ensure, the examples you provided above doesn’t include data that I can sent to smart contract for on-chain verification. If I need that, should I call API like this?
I’m becoming increasingly confused by the documentation, as it does not clearly explain how to satisfy what seems like a straightforward use case.
My requirement is to retrieve the price data for a specific historical timestamp in a hex-encoded format, then submit that data to my existing EVM smart contract for on-chain verification.
After reading the documentation several times, my understanding is that using the Pyth Pro API would require my smart contract to integrate with or migrate to the Pyth Lazer contracts. That would be a contract-level integration change, not simply an API endpoint upgrade.
Could you please clarify the simplest supported way to do the following?
Request the price for a specific historical timestamp.
Receive the corresponding signed, hex-encoded price update data.
Submit that data to an existing EVM smart contract for verification.
Is this possible using the standard Pyth contracts, or is migrating to Pyth Lazer mandatory?
The current documentation makes the relationship between the Pro API, historical price retrieval, and the required on-chain contracts unnecessarily difficult to understand. A direct example covering this exact workflow would be very helpful.
with formats: ["evm"] and jsonBinaryEncoding: "hex", like in your example.
Important distinction: that evm payload is for the Pyth Pro/Lazer EVM contracts. It is not a drop-in replacement for the legacy Pyth Core/Hermes payload used by existing Pyth Core EVM contracts.
Thanks for the reply. it’s clearer now. I just want to confirm again: to use that payload, do I need to update and migrate my smart contract to Pyth Lazer compatible version as you mentioned, correct?
If you want to use the Pyth Pro evm payload from POST https://pyth-lazer.dourolabs.app/v1/price, then your smart contract needs to integrate with the Pyth Pro/Lazer EVM contract interface.
That payload is not compatible with the Pyth Core updatePriceFeeds(...) interface.
For Ethereum mainnet today, you should use the upgraded Pyth Core path instead:
Fetch the Core-compatible update from upgraded Hermes: https://pyth.dourolabs.app/hermes
Submit the returned update.binary.data to the upgraded Pyth Core contract using the normal updatePriceFeeds(...) flow.
The Pyth Pro/Lazer contract-address page does not currently list Ethereum mainnet, so the Pyth Pro evm payload is not usable as is on Ethereum mainnet today. The day Pyth Pro contract is on Ethereum mainnet, it would.
Thanks for the clarification. I now understand that the Pyth Pro/Lazer payload is not compatible with existing Pyth Core contracts and that Pyth Pro/Lazer is not currently available on Ethereum mainnet.
However, this leaves a gap for existing Ethereum mainnet users who need to retrieve signed historical prices and submit them through the standard Pyth Core updatePriceFeeds(...) flow. The upgraded Hermes endpoint appears to provide only recent data, while the legacy Benchmarks API can retrieve much older historical updates.
Would it be possible to add historical price support to the paid Pyth Core-compatible API? Ideally, it would:
Support historical timestamps older than three hours.
Return signed payloads compatible with Pyth Core updatePriceFeeds(...).
Work with existing contracts on Ethereum mainnet without requiring a migration to Pyth Pro/Lazer.
I subscribed to the Starter plan expecting it to provide a migration path for this existing historical-price workflow. It would be very helpful if the paid API could retain the functionality currently available through the legacy Benchmarks endpoint.