Skip to main content

Module parse

Module parse 

Source
Expand description

Conversion of CoinAPI REST responses into Nautilus instruments and market data.

Price and size increments come from CoinAPI price_precision and size_precision. These are provider data resolutions, not venue trading increments. Market data values finer than the instrument precision are rejected, except for bounded numeric tails in OHLCV volume, as on the WebSocket path.

Structs§

CoinApiInstrument
A native instrument with the full CoinAPI symbol_id for its transport requests and subscriptions.

Enums§

InstrumentError
A CoinAPI symbol that cannot become a complete native instrument.

Functions§

parse_bar
Converts a historical OHLCV period into a bar of the requested type, taking both ts_event and ts_init from time_period_end.
parse_instrument
Parses one CoinAPI symbol into a native spot, perpetual, or futures instrument.
parse_instruments
Parses the spot, perpetual, and futures symbols in a metadata response.
parse_order_book
Converts a current order book into an L2 market-by-price book stamped with time_exchange.
parse_quote_tick
Converts a historical best bid and ask, taking both ts_event and ts_init from time_exchange.
parse_trade_tick
Converts a historical trade, taking both ts_event and ts_init from time_exchange.