Pyth
Oracle price feeds, search, and historical prices via Pyth Network.
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
| Operation | Description | Key inputs |
|---|---|---|
| searchFeeds | Search for price feeds by keyword | searchQuery, assetType |
| getLatestPrices | Get latest prices for feed(s) | feedIds |
| getHistoricalPrice | Get price at a specific timestamp | feedIds, publishTime |
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| feedIds | string | For price ops | Comma-separated Pyth feed IDs (hex format) |
| searchQuery | string | For searchFeeds | Search keyword (e.g., SOL, BTC) |
| assetType | string | No | Search filter: All, crypto, fx, equity, metal, commodities, or rates |
| publishTime | number | For getHistoricalPrice | Unix 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
