Skip to content

Rust client for the Alpha Vantage API.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

asmarques/alphavantage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

use alphavantage::Client;

#[tokio::main]
async fn main() {
    let client = Client::new("MY_SECRET_TOKEN");
    let time_series = client.get_time_series_daily("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:

use alphavantage::blocking::Client;

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

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

About

Rust client for the Alpha Vantage API.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages