9 releases (breaking)

0.7.1 Jan 4, 2025
0.7.0 Feb 20, 2021
0.6.0 Feb 8, 2020
0.5.0 Dec 9, 2018
0.1.1 Jun 17, 2018

#540 in Web programming

Download history 12/week @ 2024-09-25 4/week @ 2024-10-02 2/week @ 2024-10-09 4/week @ 2024-10-16 3/week @ 2024-10-30 5/week @ 2024-11-06 2/week @ 2024-11-13 9/week @ 2024-11-20 5/week @ 2024-11-27 4/week @ 2024-12-04 14/week @ 2024-12-11 2/week @ 2024-12-18 137/week @ 2025-01-01 10/week @ 2025-01-08

150 downloads per month
Used in nasdaq

MIT/Apache

58KB
944 lines

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);
}

Dependencies

~6–18MB
~234K SLoC