Skip to main content

Hermes by Pyth

Overview

Hermes by Pyth is a decentralized oracle network designed to provide reliable and accurate price feeds for various assets on the blockchain.

For more details, refer to the official API documentation.

Key Features

  • Decentralized Oracle Network: Hermes leverages a decentralized network to fetch and deliver real-time price information.
  • Reliability: Designed to provide accurate and trustworthy price feeds for decentralized applications (DApps) and smart contracts.
  • Customizable Data Sources: Allows users to customize data sources to ensure flexibility in choosing reliable price information.

Hermes by Pyth Methods

/api/get_price_feed

Get a price update for a price feed with a specific timestamp

Parameters:

  • id: The id of the price feed to get an update for.
  • publish_time: The unix timestamp in seconds. This endpoint will return the first update whose publish_time is >= the provided value.

/api/get_vaa

Get a VAA for a price feed with a specific timestamp

Parameters:

  • id: The ID of the price feed to get an update for.
  • publish_time: The unix timestamp in seconds. This endpoint will return the first update whose publish_time is >= the provided value.

/api/get_vaa_ccip

Get a VAA for a price feed using CCIP

Parameters:

  • data: A hex-encoded byte string of the following form: <price feed id (32 bytes)> <publish time as unix timestamp (8 bytes, big endian)>

/api/latest_price_feeds

Get the latest price updates by price feed id.

Parameters:

  • ids[]: This parameter can be provided multiple times to retrieve multiple price updates, for example, see the following query string: ?ids[]=a12...&ids[]=b4c...

/api/latest_vaas

Get VAAs for a set of price feed ids. Given a collection of price feed ids, retrieve the latest VAA for each. The returned VAA(s) can be submitted to the Pyth contract to update the on-chain price. If VAAs are not found for every provided price ID, the call will fail.

Parameters:

  • ids[]: This parameter can be provided multiple times to retrieve multiple price updates, for example, see the following query string: ?ids[]=a12...&ids[]=b4c...

/api/price_feed_ids

Get the set of price feed IDs.

Parameters:

  • No specific parameters required.