Solaris AISolaris AI FlowDocs
Node ReferenceData

Pyth

Oracle price feeds, search, and historical prices via Pyth Network.

View as Markdown

Pyth Network provides high-frequency oracle price feeds used by Solana DeFi protocols. The Pyth node supports feed discovery, real-time prices, and historical price lookups.

Prerequisites

No credential required. All operations use Pyth's public Hermes API.

Operations

OperationDescriptionKey inputs
searchFeedsSearch for price feeds by keywordsearchQuery, assetType
getLatestPricesGet latest prices for feed(s)feedIds
getHistoricalPriceGet price at a specific timestampfeedIds, publishTime

Configuration

FieldTypeRequiredDescription
feedIdsstringFor price opsComma-separated Pyth feed IDs (hex format)
searchQuerystringFor searchFeedsSearch keyword (e.g., SOL, BTC)
assetTypestringNoSearch filter: All, crypto, fx, equity, metal, commodities, or rates
publishTimenumberFor getHistoricalPriceUnix timestamp

Output

searchFeeds returns the raw Pyth feed list under .data:

{
  "success": true,
  "operation": "searchFeeds",
  "data": [ { "id": "0xef0d...", "attributes": { "symbol": "Crypto.SOL/USD" } } ]
}

getLatestPrices and getHistoricalPrice enrich each feed with a humanPrice (and humanEmaPrice for latest), and surface the enriched list under prices instead of data. They echo back feedIds (and timestamp for historical):

{
  "success": true,
  "operation": "getLatestPrices",
  "feedIds": ["ef0d8b6f..."],
  "prices": [
    {
      "id": "ef0d8b6f...",
      "price": { "price": "15023000000", "expo": -8, "publish_time": 1716000000 },
      "ema_price": { "price": "15012000000", "expo": -8 },
      "humanPrice": "150.23",
      "humanEmaPrice": "150.12"
    }
  ]
}

If the upstream response is not a parseable object, the node falls back to the standard data envelope. Reference fields downstream with the response name (default pythResponse), for example {pythResponse.prices[0].humanPrice}.

Common use cases

  • Get oracle prices for DeFi calculations (more reliable than DEX prices)
  • Compare oracle vs. market prices for arbitrage detection
  • Look up historical prices for backtesting strategies

Next steps

On this page