Oracle Status
Disconnected
Pyth Hermes API
Last Update
Never
Pull Oracle
On-demand updates
Push Oracle
Deprecated
Endpoint: Hermes API
Network: Solana Devnet
Update Interval: 5 seconds
Tutorial Integration
This live demo showcases the concepts covered in our comprehensive Pyth price feeds tutorial. The code examples below are taken directly from the tutorial and demonstrate production-ready integration patterns.
Pull Oracle Focus
Modern on-demand architecture
Security First
Comprehensive validation
Testing Excellence
Unit & integration tests
Migration Guide
Push to pull transition
Code Examples from Tutorial
Modern pull oracle implementation with security validations
use pyth_solana_receiver_sdk::price_update::PriceUpdateV2;
pub fn fetch_price_pull(ctx: Context<FetchPricePull>) -> Result<()> {
let price_update = &ctx.accounts.price_update;
let price = price_update.get_price_unchecked();
// Validate staleness (60 seconds)
let clock = Clock::get()?;
if clock.unix_timestamp - price.publish_time > 60 {
return Err(ErrorCode::StalePriceFeed.into());
}
// Validate confidence
let confidence_ratio = (price.conf as f64) / (price.price.abs() as f64);
if confidence_ratio > 0.1 {
return Err(ErrorCode::LowConfidencePrice.into());
}
msg!("Price: {:.2}", (price.price as f64) * 10f64.powi(price.expo));
Ok(())
}
Complete Tutorial Resources
Tutorial Highlights
- • Quick Start: Get running in 10 minutes
- • Production patterns with security best practices
- • Comprehensive testing framework
- • Real-world DeFi use cases
- • Migration guide from push to pull oracles
- • Monitoring and deployment guidance
Live Price Feeds
Updates every 5 seconds
Learn How to Build This
This demo showcases concepts from our comprehensive Pyth price feeds tutorial. Learn how to integrate reliable, real-time price data into your Solana applications with production-ready security practices.