apple-quant-algorithmic 0.2.0

Apple Quant's algorithmic trading api
Documentation
use crate::{price::PriceType, volume::VolumeType};
use std::fmt::Debug;

use super::InstrumentKind;

mod decimal;
mod floating_point;
mod xspec;

pub use decimal::*;
pub use floating_point::*;
pub use xspec::*;

pub trait InstrumentSpec: Debug + Clone + Copy + PartialEq + Eq + PartialOrd + Ord {
	const INSTRUMENT_KIND: InstrumentKind;
	const BARE_SYMBOL: &'static str;

	type PriceSpec: XSpec;
	type VolumeSpec: XSpec;

	type PriceType: PriceType<Self::PriceSpec>;
	type VolumeType: VolumeType<Self::VolumeSpec>;
}