apple-quant-algorithmic 0.4.0

Apple Quant's algorithmic library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{
	aggregation::TradeTradeTimestampListInline, instrument::InstrumentSpec,
	timestamp::TradeTimestamp,
};

pub trait MarketDataDecoder<IS: InstrumentSpec>: 'static + Send {
	/// Each iteration must contain atleast 1 trade.
	fn decode_trade_list(
		&mut self,
	) -> impl Future<Output = Option<(
		TradeTradeTimestampListInline<IS, 8>,
		TradeTimestamp,
	)>> + Send;
}

pub trait MarketDataDecoderProvider<IS: InstrumentSpec> {
	type MarketDataDecoder: MarketDataDecoder<IS>;
}