Expand description
Conversion of CoinAPI WebSocket messages into Nautilus market data.
Instrument precisions come from CoinAPI data resolutions, which can lag the stream. A value with more decimal places than its instrument precision is rejected, except for bounded numeric tails in OHLCV volume.
Functionsยง
- bar_
spec_ to_ period_ id - Returns the CoinAPI streaming
period_idfor a last-price bar specification. - parse_
aggressor_ side - Maps an exchange taker side to the aggressor side.
- parse_
bar - Converts a completed OHLCV period into an external last-price bar closing at
time_period_end. - parse_
book_ deltas - Converts a full L2
booksnapshot or update into deltas, takingts_eventfromtime_exchangeandts_initfromtime_coinapi. - parse_
book_ depth - Converts a fixed-depth
book5,book20, orbook50message into its bestdepthlevels per side, takingts_eventfromtime_exchangeandts_initfromtime_coinapi. - parse_
quote_ tick - Converts a best bid and ask, taking
ts_eventfromtime_exchangeandts_initfromtime_coinapi. - parse_
trade_ tick - Converts a trade, taking
ts_eventfromtime_exchangeandts_initfromtime_coinapi. - period_
id_ to_ bar_ spec - Returns the last-price bar specification for a CoinAPI streaming
period_id.