Expand description
§dukascopy-rs
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.
§Optional cargo features
- serde - enables serialization support for
Tickstruct
§TODO
- support for any date and time (not only full hours)
DataSupplierthat retries requests upon failure
Structs§
- Dukascopy
Service - Processes the data from a given DataSupplier
- Error
- Error that can be emitted when interacting with DukascopyService
- Tick
- Instrument’s price change event
Enums§
- Kind
- Represents different possible error types that could happen when interacting with the Dukascopy API.
Traits§
- Data
Supplier - An interface used by DukascopyService to fetch the data for further processing