pub struct ItchParser { /* private fields */ }Expand description
Converts a stream of ITCH 5.0 messages into OrderBookDelta events
for a single instrument.
Maintains internal order state to compute remaining sizes after partial executions and cancellations.
Implementations§
Source§impl ItchParser
impl ItchParser
Sourcepub fn new(instrument_id: InstrumentId, stock: &str, base_ns: u64) -> Self
pub fn new(instrument_id: InstrumentId, stock: &str, base_ns: u64) -> Self
Creates a new ItchParser for the given instrument.
§Arguments
instrument_id- The NautilusTrader instrument ID for output deltas.stock- The ITCH stock symbol to filter for (e.g., “AAPL”).base_ns- Base UNIX nanoseconds for midnight of the trading day (ITCH timestamps are nanoseconds since midnight).
Sourcepub fn parse_gzip_file(&mut self, path: &Path) -> Result<Vec<OrderBookDelta>>
pub fn parse_gzip_file(&mut self, path: &Path) -> Result<Vec<OrderBookDelta>>
Parses all ITCH messages from a gzip-compressed file and returns
the filtered OrderBookDelta events.
§Errors
Returns an error if the file cannot be opened or contains invalid data.
Sourcepub fn parse_reader<R: Read>(
&mut self,
reader: R,
) -> Result<Vec<OrderBookDelta>>
pub fn parse_reader<R: Read>( &mut self, reader: R, ) -> Result<Vec<OrderBookDelta>>
Parses all ITCH messages from a reader and returns filtered deltas.
§Errors
Returns an error if the stream contains invalid data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ItchParser
impl RefUnwindSafe for ItchParser
impl Send for ItchParser
impl Sync for ItchParser
impl Unpin for ItchParser
impl UnsafeUnpin for ItchParser
impl UnwindSafe for ItchParser
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