#![allow(unused)]
#[rustfmt::skip]
#[allow(dead_code)]
fn doc_block_line_34() {
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
use finance_query::{Ticker, Region};
use std::time::Duration;
let ticker = Ticker::builder("2330.TW")
.region(Region::Taiwan)
.timeout(Duration::from_secs(30))
.build()
.await?;
let ticker = Ticker::builder("AAPL")
.logo()
.cache(Duration::from_secs(300))
.build()
.await?;
let ticker = Ticker::builder("AAPL")
.lang("en-US")
.region_code("US")
.timeout(Duration::from_secs(20))
.proxy("http://proxy.example.com:8080")
.build()
.await?;
Ok(())
}
}
#[cfg(all(feature = "polygon", feature = "fmp"))]
#[rustfmt::skip]
#[allow(dead_code)]
fn doc_block_line_86() {
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
use finance_query::{Capability, Fetch, Provider, Providers};
let providers = Providers::builder()
.route(Capability::QUOTE, [Provider::Polygon, Provider::Yahoo])
.route(Capability::FUNDAMENTALS, [Provider::Fmp, Provider::Yahoo])
.fetch(Fetch::Sequential)
.build()
.await?;
let aapl = providers.ticker("AAPL").build().await?;
let msft = providers.ticker("MSFT").build().await?;
Ok(())
}
}
#[rustfmt::skip]
#[allow(dead_code)]
fn doc_block_line_1864() {
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
use finance_query::{Ticker, Interval, TimeRange};
use finance_query::format::Raw;
let ticker = Ticker::builder("AAPL").logo().build().await?;
let quote = ticker.quote::<Raw>().await?;
let chart = ticker.chart(Interval::OneDay, TimeRange::OneMonth).await?;
let profile = ticker.asset_profile().await?;
let ticker1 = Ticker::builder("AAPL").logo().build().await?;
let quote = ticker1.quote::<Raw>().await?;
let ticker2 = Ticker::new("AAPL").await?;
let chart = ticker2.chart(Interval::OneDay, TimeRange::OneMonth).await?;
Ok(())
}
}