finance-query 3.0.0

A Rust library for querying financial data
Documentation
// @generated by `cargo soothfast docs gen-tests`
// source: docs/index.md
#![allow(unused)]

// line 110
#[rustfmt::skip]
#[test]
fn doc_block_line_110() {
        use finance_query::{Ticker, Interval, TimeRange, format::Raw};

        #[tokio::main]
        async fn main() -> Result<(), Box<dyn std::error::Error>> {
            // Get detailed quote for Apple
            let ticker = Ticker::builder("AAPL").logo().build().await?;
            let quote = ticker.quote::<Raw>().await?;
            println!("{} price: ${:.2}", quote.symbol, quote.regular_market_price.unwrap_or(0.0));

            // Get historical charts
            let chart = ticker.chart(Interval::OneDay, TimeRange::OneMonth).await?;
            println!("Retrieved {} candles", chart.candles.len());

            Ok(())
        }
    main();
}