#client #stock #api-client #api #finnhub

finnhub-rs

芬恩胡伯-rs 是一个用 Rust 实现的 Finnhub API 客户端

2 个版本

0.1.2 2021 年 2 月 5 日
0.1.1 2021 年 2 月 5 日
0.1.0-alpha2021 年 1 月 27 日

269财务

MIT 许可证

15KB
236

finnhub-rs

License: MIT

Rust 对 Finnhub API 的客户端。Finnhub 是一个新的股票 API,提供股票、货币和加密货币的无限数据。

最小示例

// Use finnhub-rs client.
use finnhub_rs::client::Client;

fn main() {
    // Create a new finnhub client.
    let client = Client::new("MY FINNHUB API KEY".to_string());
    // Get a list of supported stocks given the exchange.
    let res = client.stock_symbol("US".to_string()).await.unwrap();
    // Print out the results.
    println!("{:#?}", res);
}

lib.rs:

芬恩胡伯-rs 是一个用 Rust 实现的 Finnhub API 客户端。

最小示例

// Use finnhub-rs client.
use finnhub_rs::client::Client;

fn main() {
  // Create a new finnhub client.
  let client = Client::new("MY FINNHUB API KEY".to_string());
   // Get a list of supported stocks given the exchange.
   let res = client.stock_symbol("US".to_string()).await.unwrap();
   // Print out the results.
   println!("{:#?}", res);
}

依赖关系

~8–21MB
~315K SLoC