skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
hedera-dev/hedera-skills333 installs

pyth-price-feeds

Pyth pull price feeds on Hedera. Use when integrating Pyth on Hedera (testnet 296 / mainnet 295), fetching Hermes update payloads, paying updatePriceFeeds, calling getPriceNoOlderThan, checking confidence, or normalizing signed price + expo to 18 decimals.

How do I install this agent skill?

npx skills add https://github.com/hedera-dev/hedera-skills --skill pyth-price-feeds
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill provides legitimate documentation and code examples for integrating Pyth price feeds on the Hedera network. It contains no malicious patterns, obfuscation, or unauthorized data access.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Pyth Price Feeds (Hedera)

Pull pattern: Pyth is not a fire-and-forget push feed. Fresh reads usually need a Hermes payload submitted on-chain (payable) before getPriceNoOlderThan.

Hermes → updatePriceFeeds{value: fee}(updateData) → getPriceNoOlderThan(priceId, maxAge)

Consumers may wrap Pyth behind a local interface; that is optional. Do not assume a project-specific adapter name.

Quick Reference

PieceRole
Pyth contractNetwork IPyth address
Price IDbytes32 feed id (not an aggregator address)
UpdatePayable updatePriceFeeds with Hermes updateData
FeegetUpdateFee(updateData) — msg.value must cover it
ReadgetPriceNoOlderThan(priceId, maxAge)
ConfidenceReject when conf > uint64(price)
ScaleSigned price + expo → consumer decimals (often 18)

Hedera chain IDs: testnet 296, mainnet 295.

See references/hedera-feeds.md for where to source the Pyth contract and price IDs. See references/examples.md for update / read / expo sketches.

Critical: Update Before Fresh Reads

If the on-chain price is older than your staleness bound, fetch Hermes update data and submit it:

function updatePrice(bytes[] calldata updateData) external payable {
    uint256 fee = PYTH.getUpdateFee(updateData);
    if (msg.value < fee) revert UpdateFeeTooLow(msg.value, fee);
    PYTH.updatePriceFeeds{ value: msg.value }(updateData);
}

Hedera msg.value is tinybars via JSON-RPC — attach enough native value for the Pyth fee. Do not treat a stale getPriceUnsafe as a valid trading price.

Critical: Confidence And Signed Expo

After getPriceNoOlderThan:

CheckWhy
publishTime != 0Incomplete
price > 0Invalid / non-positive
conf > uint64(price)Confidence wider than the price
Normalize expoexpo is signed; not the same as ERC-20 decimals
PythStructs.Price memory price = PYTH.getPriceNoOlderThan(priceId, maxStaleness);
if (price.publishTime == 0) revert IncompleteRound();
if (price.price <= 0) revert InvalidPrice();
if (price.conf > uint64(price.price)) revert InvalidConfidence();

Checklist

When implementing or reviewing Pyth on Hedera:

  • Pyth contract + price IDs taken from Pyth Hedera / Hermes docs (not Ethereum defaults)
  • Hermes payloads submitted with sufficient msg.value before relying on a fresh price
  • Reads use getPriceNoOlderThan (or equivalent max-age API), not unbounded unsafe prices for trading
  • Confidence wider than price reverts
  • Signed expo normalized to the consumer scale
  • Chain ID is 295 or 296 (or the project’s documented Hedera network)

References

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/hedera-dev/hedera-skills/pyth-price-feeds">View pyth-price-feeds on skillZs</a>