Rust driver for MarketStore
rsmarketstore can query and [write TBD
] financial timeseries data from MarketStore
bash
cargo add rsmarketstore
```rust // Connect let agent = Agent::connect( Uri::from_static("http://localhost:5995").into()).await;
// Query agent .query(QueryParams { symbols: vec!["NIFTY 50".tostring()], timeframe: marketstore::MIN, attrgroup: "OHLCV".tostring(), ..Default::default() }) .await?
// timeframes let FiveMins = 5 * marketstore::MIN; let FifteenMin = 15 * marketstore::MIN;
let TwoHours = 2 * marketstore::HOUR;
// stream
let (stream, receiver) = stream::connect::
stream.subscribe(vec!["NIFTY 50".into()]).await?;
receiver
.for_each(|msg| async move {
println!("{:#?}", msg);
})
.await;
```
Source can be found in examples/ohlcv
```bash
cargo run --example ohlcv --features=serde ```
Source can be found in examples/stream
```bash
cargo run --example stream --features=stream ```