alphavantage

Crate Documentation Build Status

A Rust client for the Alpha Vantage API.

Currently supports the following operations:

The default client is asynchronous but a blocking client is also available through the optional blocking feature.

Example

Using the default asynchronous client:

```rust use alphavantage::Client;

[tokio::main]

async fn main() { let client = Client::new("MYSECRETTOKEN"); let timeseries = client.gettimeseriesdaily("GOOG").await.unwrap(); let entry = time_series.entries.last().unwrap(); println!("{:?}", entry);

let exchange_rate = client.get_exchange_rate("USD", "EUR").await.unwrap();
println!("{:?}", exchange_rate);

} ```

Using the optional blocking client:

```rust use alphavantage::blocking::Client;

fn main() { let client = Client::new("MYSECRETTOKEN"); let timeseries = client.gettimeseriesdaily("GOOG").unwrap(); let entry = time_series.entries.last().unwrap(); println!("{:?}", entry);

let exchange_rate = client.get_exchange_rate("USD", "EUR").unwrap();
println!("{:?}", exchange_rate);

} ```