Crates.io | dukascopy_rs |
lib.rs | dukascopy_rs |
version | 0.1.2 |
source | src |
created_at | 2022-04-22 21:46:39.480842 |
updated_at | 2022-04-23 16:58:51.963559 |
description | Dukascopy API integration for Rust |
homepage | |
repository | https://github.com/eEQK/dukascopy_rs |
max_upload_size | |
id | 572394 |
size | 18,158 |
Stream historical tick data straight from Dukascopy
use dukascopy_rs::DukascopyService;
use futures::TryStreamExt;
use time::macros::datetime;
#[tokio::main]
async fn main() {
DukascopyService::default()
.download_ticks(
String::from("EURGBP"),
// only full hours are supported for now
datetime!(2020-03-12 13:00),
datetime!(2020-03-12 15:00),
)
.try_for_each(|e| async move {
println!("{}", e);
Ok(())
})
.await
.unwrap_or(());
}
source: example/main.rs
For details on what are the possible inputs/outputs, please have a look on download_ticks
method documentation.
Tick
structDataSupplier
that retries requests upon failure