Skip to main content

py_stream_coinapi_trades

Function py_stream_coinapi_trades 

Source
pub fn py_stream_coinapi_trades(
    filepath: PathBuf,
    instrument_id: InstrumentId,
    chunk_size: usize,
    price_precision: Option<u8>,
    size_precision: Option<u8>,
    limit: Option<usize>,
) -> PyResult<CoinApiTradeStreamIterator>
Expand description

Streams trade ticks from a CoinAPI T-TRADES flat file in chunks.

Infers each precision not given from the leading rows, and raises for a later value that would need rounding.

ยงErrors

Returns an error if chunk_size is outside [1, 1_000_000] or the file cannot be opened. Python receives a ValueError.