pub struct TardisL2Event {
pub symbol: String,
pub timestamp_us: u64,
pub bids: Vec<(Decimal, Decimal)>,
pub asks: Vec<(Decimal, Decimal)>,
pub local_timestamp_us: Option<u64>,
}Expand description
Tardis L2 event structure for Binance 25-level orderbook data
Tardis provides orderbook snapshots with up to 25 price levels on each side (bid/ask) with microsecond timestamps.
Fields§
§symbol: StringSymbol (e.g., “BTC-USDT”)
timestamp_us: u64Exchange timestamp in microseconds
bids: Vec<(Decimal, Decimal)>Bid levels (price, quantity) - up to 25 levels
asks: Vec<(Decimal, Decimal)>Ask levels (price, quantity) - up to 25 levels
local_timestamp_us: Option<u64>Local timestamp when data was received (microseconds)
Implementations§
Source§impl TardisL2Event
impl TardisL2Event
Sourcepub fn to_snapshot(self) -> OrderBookSnapshot
pub fn to_snapshot(self) -> OrderBookSnapshot
Convert to OrderBookSnapshot with nanosecond precision
Sourcepub fn from_csv_lines(lines: &[&str]) -> Result<Self, ParseError>
pub fn from_csv_lines(lines: &[&str]) -> Result<Self, ParseError>
Parse from Tardis CSV line format
Expected format: timestamp_us,symbol,side,price,quantity,local_timestamp_us Multiple lines represent different levels, grouped by timestamp
Trait Implementations§
Source§impl Clone for TardisL2Event
impl Clone for TardisL2Event
Source§fn clone(&self) -> TardisL2Event
fn clone(&self) -> TardisL2Event
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TardisL2Event
impl RefUnwindSafe for TardisL2Event
impl Send for TardisL2Event
impl Sync for TardisL2Event
impl Unpin for TardisL2Event
impl UnwindSafe for TardisL2Event
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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