use yahoo_finance::{history, Interval, Timestamped};
#[tokio::main]
async fn main() {
let data = history::retrieve_interval("AAPL", Interval::_6mo).await.unwrap();
for end in &data {
println!("Close ${:.2}, {}", end.close,end.datetime().format("%b %e %y)"));
}
}
Basically, I want to take this program, and have the output as .csv file, not println!(), I just used println! to make sure the program worked. I'm still fairly new to Rust, and programming in general (apologies if I sound uneducated). I'm just making this program as something practical I can use (working in the finance industry) and build upon it.