Pyth Oracle Prices
Learn more about getting a Pyth Price data stream from our WebSocket.
Getting Started
Access real-time Oracle prices for tokens and other off-chain assets from Pyth's price feeds. Learn more about the available Pyth price feeds and products here.
Follow our guided recipe to learn how you can quickly start streaming Pyth Prices from Solana.
Demo for Solana Pyth Oracle API
The free live demo for these endpoints can be found here:
- Live demo: https://solana-pyth-api.vybenetwork.com
- GitHub repo: https://github.com/vybenetwork/solana-pyth-api
You can visit this link to access and try the demo: https://solana-pyth-api.vybenetwork.com
Filters
Example filter configuration message:
{
"type": "configure",
"filters": {
"oraclePrices": [
{
"priceFeedAccount": "GVXRSBjFk6e6J3NbVPXohDJetcTjaeeuykUpbQF8UoMU"
}
]
}
}Utilize the following filters to configure your Pyth Oracle feed. Leaving these empty will return ALL price feeds.
| Name | Description |
|---|---|
| priceFeedAccount | The public key of the Pyth Price Feed |
| productAccount | The public key of the Pyth Product |
Response
Example response message:
{
"priceFeedAccount": "GVXRSBjFk6e6J3NbVPXohDJetcTjaeeuykUpbQF8UoMU",
"lastUpdated": 1772571674,
"validSlot": 404015802,
"price": "68164.09999998",
"confidence": "20.31000002",
"emac1H": "24.30734530",
"emap1H": "68413.04900000"
}Overview of the response from a Pyth Oracle Price data stream:
| Name | Description |
|---|---|
| confidence | Confidence interval of how close we think the true price is to the average. It's influenced by both how sure each person quoting the price is, and how much they agree with each other. |
| emac1H | Exponentially-weighted moving average confidence interval is a time-weighted average of the confidence interval. |
| emap1H | Exponentially-weighted moving average price is a time-weighted average of the aggregate price. |
| lastUpdated | The last updated time. |
| price | Price of asset expressed in USD. |
| priceFeedAccount | The public key of the Pyth Price Feed. |
| validSlot | The last valid slot |
Updated 6 days ago
Did this page help you?