// @generated by `cargo soothfast docs gen-tests`
// source: docs/library/ticker.md line 466
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
use finance_query::{Ticker, TimeRange};
let ticker = Ticker::new("AAPL").await?;
let dividends = ticker.dividends(TimeRange::TwoYears).await?;
for div in ÷nds {
// div.timestamp is a Unix timestamp (i64, seconds since epoch)
println!("timestamp={}, amount=${:.4}", div.timestamp, div.amount);
}
Ok(())
}