apple-quant-algorithmic 0.2.0

Apple Quant's algorithmic trading api
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use tokio::{fs::File, io::BufReader};

use crate::{aggregation::TradeTradeTimestamp, instrument::InstrumentSpec};

pub trait DataBackend<IS: InstrumentSpec> {
	fn new(key: Option<&str>) -> Self;

	fn file_name_postpend() -> &'static str;

	fn stream_in(
		&mut self,
		buf_reader: BufReader<File>,
	) -> impl Future<Output = impl ExactSizeIterator<Item = TradeTradeTimestamp<IS>>> + Send;
}