finance-query 3.0.0

A Rust library for querying financial data
Documentation
// @generated by `cargo soothfast docs gen-tests`
// source: docs/library/tickers.md line 519
use finance_query::Tickers;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let tickers = Tickers::new(vec!["AAPL", "MSFT"]).await?;

    // Fetch news for all symbols
    let response = tickers.news().await?;

    // Process news
    for (symbol, articles) in &response.news {
        println!("{}: {} news articles", symbol, articles.len());
        for article in articles.iter().take(3) {
            println!("  Title: {}", article.title);
            println!("  Source: {}", article.source);
            println!("  Link: {}", article.link);
        }
    }
    Ok(())
}