tvdata-rs 0.1.2

Async Rust client for TradingView screener queries, search, calendars, quote snapshots, and OHLCV history.
Documentation
use tvdata_rs::prelude::*;

#[tokio::main]
async fn main() -> Result<()> {
    let client = TradingViewClient::builder().build()?;

    let query = ScanQuery::new()
        .market("america")
        .tickers(["NASDAQ:AAPL"])
        .select(fields::quote_snapshot())
        .push_column(fields::technical::RSI)
        .push_column(fields::technical::MACD)
        .push_column(fields::analyst::PRICE_TARGET_AVERAGE);

    let response = client.scan(&query).await?;
    let first_row = &response.rows[0];
    let record = first_row.as_record(&query.columns);

    println!("{record:#?}");
    Ok(())
}