apple-quant-algorithmic 0.1.0

Apple Quant's algorithmic trading api
Documentation
use crate::{
	instrument::InstrumentSpec,
	volume::{DirectionlessVolume, RestingVolume},
};

use super::AbsolutePrice;

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PriceVolumeLevel<IS: InstrumentSpec> {
	pub price: AbsolutePrice<IS>,
	pub resting_volume: RestingVolume<IS>,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct BidPriceVolumeLevel<IS: InstrumentSpec> {
	pub price: AbsolutePrice<IS>,

	/// Total volume as transactions.
	pub directionless_volume: DirectionlessVolume<IS>,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AskPriceVolumeLevel<IS: InstrumentSpec> {
	pub price: AbsolutePrice<IS>,

	/// Total volume as transactions.
	pub directionless_volume: DirectionlessVolume<IS>,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct BidAskPriceSpread<IS: InstrumentSpec> {
	pub bid_price: AbsolutePrice<IS>,
	pub ask_price: AbsolutePrice<IS>,
}