simple_pyth_client_rs 0.1.0

Rust wrapper for Pyth Hermes crypto price feeds
Documentation
//! # Pyth Price Feed API Wrapper (Rust)
//!
//! A high-performance, async Rust SDK to query and stream live crypto prices using the [Pyth Hermes API](https://hermes.pyth.network/docs/).
//!
//! Built to provide a simpler way to interract with Pyth Hermes crypto price feeds. Search by symbols, get token prices and price streams.
//!
//! ## ✨ Features
//!
//! - Fetch live and historical token prices (price + EMA)
//! - Stream real-time price updates
//! - Filter tokens by human-readable symbols
//! - Powered by `reqwest`, `tokio`, `serde`, `futures`
//!
//! ## 📚 Examples
//!
//! ```rust,no_run
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//!     use simple_pyth_client_rs::*;
//!     // Search for specific crypto/USD pairs
//!     let symbols = vec!["BTC", "ETH", "USDC", "SOL", "USDT"];
//!     let price_feeds = search_by_token_symbols(symbols).await?;
//!     println!("{:?}", price_feeds);

//!     Ok(())
//! }
//! ```
//!
//! ## 📂 Data Types
//!
//! ### PriceFeed
//!
//! ```rust
//! pub struct PriceFeed {
//!     pub id: String,
//!     pub attributes: Attr,
//! }
//!
//! pub struct Attr {
//!     pub asset_type: String,
//!     pub base: String,
//!     pub description: String,
//!     pub display_symbol: String,
//!     pub generic_symbol: String,
//!     pub quote_currency: String,
//!     pub schedule: String,
//!     pub symbol: String,
//! }
//! ```
//!
//! ### TokenPriceInfo
//!
//! ```rust
//! pub struct TokenPriceInfo {
//!     pub name: String,
//!     pub token_id: String,
//!     pub token_symbol: String,
//!     pub price_30s: f64,
//!     pub price_1m: f64,
//!     pub timestamp: i64,
//!     pub fluctuation_pct: f64,
//! }
//! ```
//!
//! ## 🔧 Core Methods
//!
//! - `get_price_feeds()` — Get metadata for all supported crypto/USD price feeds
//! - `get_token_price_info(ids)` — Get current price info for specific or all tokens
//! - `get_live_price_stream(ids, callback)` — Stream price updates and handle them with a callback
//! - `get_price_stream_for_duration(ids, duration_secs, tx)` — Stream prices for a set duration
//! - `search_by_token_symbols(symbols)` — Search and fetch prices using readable token symbols
//!
//! ## ✅ Requirements
//!
//! - Rust 1.70+
//! - Tokio async runtime
//!
//! ## 📅 License
//!
//! MIT
//!
//! ---
//!
//! Built with ❤️ by [Joshthebuilda](https://joshuaokechukwu.vzy.io/)

pub mod client;

pub mod types;
#[doc(hidden)]
pub mod utils;

pub use client::{
    get_live_price_stream, get_price_feeds, get_price_stream_for_duration, get_token_price_info,
    search_by_token_symbols,
};