pub struct DepthHistoryConfig {
pub cadence: TimeDelta,
pub rows: usize,
pub ticks_per_row: u32,
pub columns: usize,
pub orders: Option<OrderFilter>,
}Expand description
How a DepthHistory samples the order book.
A column holds at most rows rows per side of 16 bytes each, 24 when it samples individual
orders, and the history at most columns * 8 columns: about 15 MB with the defaults, or
23 MB sampling individual orders, which span at least 42 hours.
Fields§
§cadence: TimeDeltaLength of a column. The book is sampled at the end of every period of this length counted from the Unix epoch, and the sample stands for the whole period. At least a millisecond; one second by default.
rows: usizePrice rows kept per side of each column, those nearest the best bid and ask. 100 by default.
ticks_per_row: u32Ticks of the instrument’s tick size grouped into one price row, their sizes summed. 1 by default.
columns: usizeColumns kept at each of 8 resolutions. The newest columns columns are samples; when there
are more, the two oldest merge into one, and the merged columns overflow into the next
resolution in the same way. At least 2; 600 by default.
orders: Option<OrderFilter>Sample the individual resting orders this filter accepts, summed into rows, instead of
the aggregate prices the feed sends, and record the largest of them in each row (see
DepthColumn::largest_bid_orders); Some(OrderFilter::default()) samples every order.
Needs a feed that sends order events, see
Sink::push_order_event: with aggregate depth only
no column is sampled, and a period in which the filter cannot be applied (see
OrderFilterUnavailable) has no column. None
samples the aggregate book.
Trait Implementations§
Source§impl Clone for DepthHistoryConfig
impl Clone for DepthHistoryConfig
Source§fn clone(&self) -> DepthHistoryConfig
fn clone(&self) -> DepthHistoryConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DepthHistoryConfig
impl Debug for DepthHistoryConfig
Source§impl Default for DepthHistoryConfig
impl Default for DepthHistoryConfig
Source§impl PartialEq for DepthHistoryConfig
impl PartialEq for DepthHistoryConfig
impl StructuralPartialEq for DepthHistoryConfig
Auto Trait Implementations§
impl Freeze for DepthHistoryConfig
impl RefUnwindSafe for DepthHistoryConfig
impl Send for DepthHistoryConfig
impl Sync for DepthHistoryConfig
impl Unpin for DepthHistoryConfig
impl UnsafeUnpin for DepthHistoryConfig
impl UnwindSafe for DepthHistoryConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more