pub fn stream_deltas(
path: impl AsRef<Path>,
instrument_id: InstrumentId,
date: Option<Date>,
chunk_size: usize,
price_precision: Option<u8>,
size_precision: Option<u8>,
limit: Option<usize>,
) -> Result<impl Iterator<Item = Result<Vec<OrderBookDelta>>>>Expand description
Streams [OrderBookDelta]s from a T-LIMITBOOK_FULL file in chunks of about chunk_size.
A chunk ends only at the end of an event, so it can exceed chunk_size; the opening snapshot
is one event. A limit can end the last chunk partway through an event, which then ends with
an F_LAST delta. Dates timestamps as load_deltas does, and infers each precision not given
from the leading rows.
ยงErrors
Returns an error if chunk_size is outside [1, STREAM_CHUNK_SIZE_MAX], no date is given or
found in the path, or the file cannot be opened. Each chunk is an error if a row is invalid or
finer than its precision.