pyth

Integrate Pyth Network real-time price feeds into Solana applications on-chain and off-chain.

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/Kaleb-Rupe/aurora --skill pyth-kaleb-rupe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pyth
Source: https://github.com/Kaleb-Rupe/aurora/tree/main/system/aurora-bridge/.claude/skills/pyth
Command: npx skills add https://github.com/Kaleb-Rupe/aurora --skill pyth-kaleb-rupe

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Integrating decentralized oracle price data into Solana applications requires handling fixed-point price formats, confidence intervals, staleness checks, feed ID verification, and transaction construction, which is error-prone without a structured reference. ## Core Features & Use Cases - Off-Chain Price Fetching: Fetch and stream real-time prices via the Hermes API using @pythnetwork/hermes-client, with TypeScript client templates. - On-Chain Price Consumption: Read and validate prices in Anchor programs using pyth-solana-receiver-sdk, including staleness checks, confidence validation, and EMA prices. - Reference Data: Complete program IDs, price feed IDs for crypto, stablecoins, forex, commodities, and equities, plus a full SDK API reference and troubleshooting guide. - Use Case: Build a lending protocol that values SOL collateral by posting a Pyth price update and reading it on-chain with a 60-second staleness limit and 2% confidence bound. ## Quick Start Ask the AI to fetch the current SOL/USD price from Pyth Network and show how to consume it in an Anchor program.

Frequently Asked Questions about pyth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch Pyth Network price feeds in TypeScript?

Use the HermesClient from @pythnetwork/hermes-client and call getLatestPriceUpdates with an array of hex feed IDs. The response includes parsed price, confidence, exponent, and publish time, plus binary data for on-chain posting.

How to use Pyth prices in a Solana Anchor program?

Add pyth-solana-receiver-sdk to Cargo.toml and accept a PriceUpdateV2 account in your instruction. Call get_price_no_older_than with the Clock sysvar and a max age in seconds to get a validated price.

What is the difference between Pyth spot price and EMA price?

The spot price is the latest aggregated price, while the EMA price is an exponential moving average over roughly a one-hour window weighted by inverse confidence. EMA prices suit liquidations and collateral valuation because they resist short-term manipulation.

Why does my Pyth price update fail with PriceTooOld?

PriceTooOld occurs when the price publish time exceeds your maximum age threshold relative to the Solana clock. Post a fresh price update in the same transaction before consuming it, or increase the max age parameter.

How do I validate Pyth price confidence intervals on-chain?

Compute the confidence ratio in basis points by dividing conf by the absolute price and multiplying by 10000, then require it stays below a threshold such as 200 basis points. Reject the transaction when confidence is too wide.

What are the rate limits of the public Pyth Hermes endpoint?

The public Hermes endpoint at https://hermes.pyth.network allows about 10 requests per second, 5 concurrent connections, and up to 100 feeds per request. Production applications should use a dedicated endpoint from a Pyth data provider.