pub struct DatabentoDataLoader { /* private fields */ }
Expand description
A Nautilus data loader for Databento Binary Encoding (DBN) format data.
§Supported schemas:
- MBO ->
OrderBookDelta
- MBP_1 ->
(QuoteTick, Option<TradeTick>)
- MBP_10 ->
OrderBookDepth10
- BBO_1S ->
QuoteTick
- BBO_1M ->
QuoteTick
- TBBO ->
(QuoteTick, TradeTick)
- TRADES ->
TradeTick
- OHLCV_1S ->
Bar
- OHLCV_1M ->
Bar
- OHLCV_1H ->
Bar
- OHLCV_1D ->
Bar
- DEFINITION ->
Instrument
- IMBALANCE ->
DatabentoImbalance
- STATISTICS ->
DatabentoStatistics
- STATUS ->
InstrumentStatus
§References
Implementations§
Source§impl DatabentoDataLoader
impl DatabentoDataLoader
Sourcepub fn new(publishers_filepath: Option<PathBuf>) -> Result<Self>
pub fn new(publishers_filepath: Option<PathBuf>) -> Result<Self>
Creates a new DatabentoDataLoader
instance.
Sourcepub fn load_publishers(&mut self, filepath: PathBuf) -> Result<()>
pub fn load_publishers(&mut self, filepath: PathBuf) -> Result<()>
Load the publishers data from the file at the given filepath
.
Sourcepub const fn get_publishers(&self) -> &IndexMap<u16, DatabentoPublisher>
pub const fn get_publishers(&self) -> &IndexMap<u16, DatabentoPublisher>
Return the internal Databento publishers currently held by the loader.
pub fn get_dataset_for_venue(&self, venue: &Venue) -> Option<&Dataset>
pub fn get_venue_for_publisher( &self, publisher_id: PublisherId, ) -> Option<&Venue>
pub fn schema_from_file(&self, filepath: &Path) -> Result<Option<String>>
pub fn read_definition_records( &mut self, filepath: &Path, ) -> Result<impl Iterator<Item = Result<InstrumentAny>> + '_>
pub fn read_records<T>(
&self,
filepath: &Path,
instrument_id: Option<InstrumentId>,
price_precision: Option<u8>,
include_trades: bool,
) -> Result<impl Iterator<Item = Result<(Option<Data>, Option<Data>)>> + '_>where
T: Record + HasRType + 'static,
pub fn load_instruments( &mut self, filepath: &Path, ) -> Result<Vec<InstrumentAny>>
pub fn load_order_book_deltas( &self, filepath: &Path, instrument_id: Option<InstrumentId>, price_precision: Option<u8>, ) -> Result<Vec<OrderBookDelta>>
pub fn load_order_book_depth10( &self, filepath: &Path, instrument_id: Option<InstrumentId>, price_precision: Option<u8>, ) -> Result<Vec<OrderBookDepth10>>
pub fn load_quotes( &self, filepath: &Path, instrument_id: Option<InstrumentId>, price_precision: Option<u8>, ) -> Result<Vec<QuoteTick>>
pub fn load_bbo_quotes( &self, filepath: &Path, instrument_id: Option<InstrumentId>, price_precision: Option<u8>, ) -> Result<Vec<QuoteTick>>
pub fn load_tbbo_trades( &self, filepath: &Path, instrument_id: Option<InstrumentId>, price_precision: Option<u8>, ) -> Result<Vec<TradeTick>>
pub fn load_trades( &self, filepath: &Path, instrument_id: Option<InstrumentId>, price_precision: Option<u8>, ) -> Result<Vec<TradeTick>>
pub fn load_bars( &self, filepath: &Path, instrument_id: Option<InstrumentId>, price_precision: Option<u8>, ) -> Result<Vec<Bar>>
pub fn load_status_records<T>(
&self,
filepath: &Path,
instrument_id: Option<InstrumentId>,
) -> Result<impl Iterator<Item = Result<InstrumentStatus>> + '_>where
T: Record + HasRType + 'static,
pub fn read_imbalance_records<T>(
&self,
filepath: &Path,
instrument_id: Option<InstrumentId>,
price_precision: Option<u8>,
) -> Result<impl Iterator<Item = Result<DatabentoImbalance>> + '_>where
T: Record + HasRType + 'static,
pub fn read_statistics_records<T>(
&self,
filepath: &Path,
instrument_id: Option<InstrumentId>,
price_precision: Option<u8>,
) -> Result<impl Iterator<Item = Result<DatabentoStatistics>> + '_>where
T: Record + HasRType + 'static,
Trait Implementations§
Source§impl IntoPy<Py<PyAny>> for DatabentoDataLoader
impl IntoPy<Py<PyAny>> for DatabentoDataLoader
Source§impl PyClass for DatabentoDataLoader
impl PyClass for DatabentoDataLoader
Source§impl PyClassImpl for DatabentoDataLoader
impl PyClassImpl for DatabentoDataLoader
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
Source§type ThreadChecker = SendablePyClass<DatabentoDataLoader>
type ThreadChecker = SendablePyClass<DatabentoDataLoader>
This handles following two situations: Read more
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature<DatabentoDataLoader> for PyClassImplCollector<DatabentoDataLoader>
impl PyClassNewTextSignature<DatabentoDataLoader> for PyClassImplCollector<DatabentoDataLoader>
fn new_text_signature(self) -> Option<&'static str>
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a DatabentoDataLoader
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a DatabentoDataLoader
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut DatabentoDataLoader
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut DatabentoDataLoader
Source§impl PyMethods<DatabentoDataLoader> for PyClassImplCollector<DatabentoDataLoader>
impl PyMethods<DatabentoDataLoader> for PyClassImplCollector<DatabentoDataLoader>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for DatabentoDataLoader
impl PyTypeInfo for DatabentoDataLoader
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
Returns the safe abstraction over the type object.
§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
Checks if
object
is an instance of this type or a subclass of this type.§fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
Checks if
object
is an instance of this type.impl DerefToPyAny for DatabentoDataLoader
Auto Trait Implementations§
impl Freeze for DatabentoDataLoader
impl RefUnwindSafe for DatabentoDataLoader
impl Send for DatabentoDataLoader
impl Sync for DatabentoDataLoader
impl Unpin for DatabentoDataLoader
impl UnwindSafe for DatabentoDataLoader
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