Skip to main content
The Oracle Precompile is not yet available. In the meantime, you can query prices using one of the approaches described below.
Injective offers multiple ways to access oracle price data depending on your architecture and requirements. The following approaches range from integrating with Pyth off-chain, to reading Pyth prices on-chain through Injective’s EVM.

Approach 1: Off-chain price feeds with Pyth

If your application fetches prices off-chain (for example, in a backend service or bot), you can query Pyth’s HTTP API directly without any on-chain interaction. Refer to the Pyth documentation on fetching price updates for details on available endpoints, request formats, and response schemas. This approach is ideal for off-chain trading systems, analytics dashboards, or any service that requires price data without submitting transactions.

Approach 2: On-chain price feeds with Pyth (EVM)

For smart contracts that need to read prices on-chain, you can interact with the Pyth contract deployed on Injective’s EVM. This uses Pyth’s pull-based oracle model, where price updates are fetched off-chain and submitted on-chain before reading.

Contract addresses

To obtain the Pyth contract address for Injective EVM, refer to the Pyth contract addresses page and locate the Injective EVM entry: Currently, Pyth is deployed at 0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320 on Injective’s EVM mainnet.
Always consult the official documentation to obtain up-to-date addresses.

Price feed IDs

Each asset pair has a unique price feed ID. You can look up feed IDs on the Pyth price feed IDs page. For example, search for INJ/USD.

Supported feeds

Always consult the official documentation to obtain up-to-date addresses.

Integration guide

For a complete walkthrough of integrating Pyth price feeds into your Solidity contracts using the pull model, follow the Pyth EVM pull integration tutorial.

Example

The following example demonstrates how to read the INJ/USD price from the Pyth contract on Injective’s EVM:
getPriceUnsafe returns the last pushed price without a staleness check. For production use, prefer getPriceNoOlderThan(priceFeedId, maxAge) — but note this requires the price to have been pushed on-chain recently, otherwise the call will revert. See the Pyth documentation for more details on the pull model.
Last modified on March 30, 2026