pub struct DatabentoDataClient { /* private fields */ }
Expand description
A Databento data client that combines live streaming and historical data functionality.
This client uses the existing DatabentoFeedHandler
for live data subscriptions
and DatabentoHistoricalClient
for historical data requests. It supports multiple
datasets simultaneously, with separate feed handlers per dataset.
Implementations§
Source§impl DatabentoDataClient
impl DatabentoDataClient
Sourcepub fn new(
client_id: ClientId,
config: DatabentoDataClientConfig,
clock: &'static AtomicTime,
) -> Result<Self>
pub fn new( client_id: ClientId, config: DatabentoDataClientConfig, clock: &'static AtomicTime, ) -> Result<Self>
Creates a new DatabentoDataClient
instance.
§Errors
Returns an error if client creation or publisher configuration loading fails.
Trait Implementations§
Source§impl DataClient for DatabentoDataClient
impl DataClient for DatabentoDataClient
Source§fn venue(&self) -> Option<Venue>
fn venue(&self) -> Option<Venue>
Returns the venue associated with this client (None for multi-venue clients).
Source§fn stop(&mut self) -> Result<()>
fn stop(&mut self) -> Result<()>
Stops the data client and cancels all active subscriptions.
§Errors
Returns an error if the client fails to stop cleanly.
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Returns whether the client is currently connected.
Source§fn subscribe_quotes(&mut self, cmd: &SubscribeQuotes) -> Result<()>
fn subscribe_quotes(&mut self, cmd: &SubscribeQuotes) -> Result<()>
Subscribes to quote tick data for the specified instruments.
§Errors
Returns an error if the subscription request fails.
Source§fn subscribe_trades(&mut self, cmd: &SubscribeTrades) -> Result<()>
fn subscribe_trades(&mut self, cmd: &SubscribeTrades) -> Result<()>
Subscribes to trade tick data for the specified instruments.
§Errors
Returns an error if the subscription request fails.
Source§fn subscribe_book_deltas(&mut self, cmd: &SubscribeBookDeltas) -> Result<()>
fn subscribe_book_deltas(&mut self, cmd: &SubscribeBookDeltas) -> Result<()>
Subscribes to order book delta updates for the specified instruments.
§Errors
Returns an error if the subscription request fails.
Source§fn subscribe_instrument_status(
&mut self,
cmd: &SubscribeInstrumentStatus,
) -> Result<()>
fn subscribe_instrument_status( &mut self, cmd: &SubscribeInstrumentStatus, ) -> Result<()>
Subscribes to instrument status updates for the specified instruments.
§Errors
Returns an error if the subscription request fails.
Source§fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn disconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn is_disconnected(&self) -> bool
fn is_disconnected(&self) -> bool
true
if the client is currently disconnected.Source§fn unsubscribe_quotes(&mut self, cmd: &UnsubscribeQuotes) -> Result<()>
fn unsubscribe_quotes(&mut self, cmd: &UnsubscribeQuotes) -> Result<()>
Source§fn unsubscribe_trades(&mut self, cmd: &UnsubscribeTrades) -> Result<()>
fn unsubscribe_trades(&mut self, cmd: &UnsubscribeTrades) -> Result<()>
Source§fn unsubscribe_book_deltas(&mut self, cmd: &UnsubscribeBookDeltas) -> Result<()>
fn unsubscribe_book_deltas(&mut self, cmd: &UnsubscribeBookDeltas) -> Result<()>
Source§fn unsubscribe_instrument_status(
&mut self,
cmd: &UnsubscribeInstrumentStatus,
) -> Result<()>
fn unsubscribe_instrument_status( &mut self, cmd: &UnsubscribeInstrumentStatus, ) -> Result<()>
Source§fn request_instruments(&self, request: &RequestInstruments) -> Result<()>
fn request_instruments(&self, request: &RequestInstruments) -> Result<()>
Source§fn request_quotes(&self, request: &RequestQuotes) -> Result<()>
fn request_quotes(&self, request: &RequestQuotes) -> Result<()>
Source§fn request_trades(&self, request: &RequestTrades) -> Result<()>
fn request_trades(&self, request: &RequestTrades) -> Result<()>
Source§fn request_bars(&self, request: &RequestBars) -> Result<()>
fn request_bars(&self, request: &RequestBars) -> Result<()>
Source§fn subscribe(&mut self, cmd: &SubscribeCustomData) -> Result<(), Error>
fn subscribe(&mut self, cmd: &SubscribeCustomData) -> Result<(), Error>
Source§fn subscribe_instruments(
&mut self,
cmd: &SubscribeInstruments,
) -> Result<(), Error>
fn subscribe_instruments( &mut self, cmd: &SubscribeInstruments, ) -> Result<(), Error>
Source§fn subscribe_instrument(
&mut self,
cmd: &SubscribeInstrument,
) -> Result<(), Error>
fn subscribe_instrument( &mut self, cmd: &SubscribeInstrument, ) -> Result<(), Error>
Source§fn subscribe_book_depth10(
&mut self,
cmd: &SubscribeBookDepth10,
) -> Result<(), Error>
fn subscribe_book_depth10( &mut self, cmd: &SubscribeBookDepth10, ) -> Result<(), Error>
Source§fn subscribe_book_snapshots(
&mut self,
cmd: &SubscribeBookSnapshots,
) -> Result<(), Error>
fn subscribe_book_snapshots( &mut self, cmd: &SubscribeBookSnapshots, ) -> Result<(), Error>
Source§fn subscribe_mark_prices(
&mut self,
cmd: &SubscribeMarkPrices,
) -> Result<(), Error>
fn subscribe_mark_prices( &mut self, cmd: &SubscribeMarkPrices, ) -> Result<(), Error>
Source§fn subscribe_index_prices(
&mut self,
cmd: &SubscribeIndexPrices,
) -> Result<(), Error>
fn subscribe_index_prices( &mut self, cmd: &SubscribeIndexPrices, ) -> Result<(), Error>
Source§fn subscribe_funding_rates(
&mut self,
cmd: &SubscribeFundingRates,
) -> Result<(), Error>
fn subscribe_funding_rates( &mut self, cmd: &SubscribeFundingRates, ) -> Result<(), Error>
Source§fn subscribe_bars(&mut self, cmd: &SubscribeBars) -> Result<(), Error>
fn subscribe_bars(&mut self, cmd: &SubscribeBars) -> Result<(), Error>
Source§fn subscribe_instrument_close(
&mut self,
cmd: &SubscribeInstrumentClose,
) -> Result<(), Error>
fn subscribe_instrument_close( &mut self, cmd: &SubscribeInstrumentClose, ) -> Result<(), Error>
Source§fn subscribe_blocks(&mut self, cmd: &SubscribeBlocks) -> Result<(), Error>
fn subscribe_blocks(&mut self, cmd: &SubscribeBlocks) -> Result<(), Error>
Source§fn subscribe_pool(&mut self, cmd: &SubscribePool) -> Result<(), Error>
fn subscribe_pool(&mut self, cmd: &SubscribePool) -> Result<(), Error>
Source§fn subscribe_pool_swaps(
&mut self,
cmd: &SubscribePoolSwaps,
) -> Result<(), Error>
fn subscribe_pool_swaps( &mut self, cmd: &SubscribePoolSwaps, ) -> Result<(), Error>
Source§fn subscribe_pool_liquidity_updates(
&mut self,
cmd: &SubscribePoolLiquidityUpdates,
) -> Result<(), Error>
fn subscribe_pool_liquidity_updates( &mut self, cmd: &SubscribePoolLiquidityUpdates, ) -> Result<(), Error>
Source§fn unsubscribe(&mut self, cmd: &UnsubscribeCustomData) -> Result<(), Error>
fn unsubscribe(&mut self, cmd: &UnsubscribeCustomData) -> Result<(), Error>
Source§fn unsubscribe_instruments(
&mut self,
cmd: &UnsubscribeInstruments,
) -> Result<(), Error>
fn unsubscribe_instruments( &mut self, cmd: &UnsubscribeInstruments, ) -> Result<(), Error>
Source§fn unsubscribe_instrument(
&mut self,
cmd: &UnsubscribeInstrument,
) -> Result<(), Error>
fn unsubscribe_instrument( &mut self, cmd: &UnsubscribeInstrument, ) -> Result<(), Error>
Source§fn unsubscribe_book_depth10(
&mut self,
cmd: &UnsubscribeBookDepth10,
) -> Result<(), Error>
fn unsubscribe_book_depth10( &mut self, cmd: &UnsubscribeBookDepth10, ) -> Result<(), Error>
Source§fn unsubscribe_book_snapshots(
&mut self,
cmd: &UnsubscribeBookSnapshots,
) -> Result<(), Error>
fn unsubscribe_book_snapshots( &mut self, cmd: &UnsubscribeBookSnapshots, ) -> Result<(), Error>
Source§fn unsubscribe_mark_prices(
&mut self,
cmd: &UnsubscribeMarkPrices,
) -> Result<(), Error>
fn unsubscribe_mark_prices( &mut self, cmd: &UnsubscribeMarkPrices, ) -> Result<(), Error>
Source§fn unsubscribe_index_prices(
&mut self,
cmd: &UnsubscribeIndexPrices,
) -> Result<(), Error>
fn unsubscribe_index_prices( &mut self, cmd: &UnsubscribeIndexPrices, ) -> Result<(), Error>
Source§fn unsubscribe_funding_rates(
&mut self,
cmd: &UnsubscribeFundingRates,
) -> Result<(), Error>
fn unsubscribe_funding_rates( &mut self, cmd: &UnsubscribeFundingRates, ) -> Result<(), Error>
Source§fn unsubscribe_bars(&mut self, cmd: &UnsubscribeBars) -> Result<(), Error>
fn unsubscribe_bars(&mut self, cmd: &UnsubscribeBars) -> Result<(), Error>
Source§fn unsubscribe_instrument_close(
&mut self,
cmd: &UnsubscribeInstrumentClose,
) -> Result<(), Error>
fn unsubscribe_instrument_close( &mut self, cmd: &UnsubscribeInstrumentClose, ) -> Result<(), Error>
Source§fn unsubscribe_blocks(&mut self, cmd: &UnsubscribeBlocks) -> Result<(), Error>
fn unsubscribe_blocks(&mut self, cmd: &UnsubscribeBlocks) -> Result<(), Error>
Source§fn unsubscribe_pool(&mut self, cmd: &UnsubscribePool) -> Result<(), Error>
fn unsubscribe_pool(&mut self, cmd: &UnsubscribePool) -> Result<(), Error>
Source§fn unsubscribe_pool_swaps(
&mut self,
cmd: &UnsubscribePoolSwaps,
) -> Result<(), Error>
fn unsubscribe_pool_swaps( &mut self, cmd: &UnsubscribePoolSwaps, ) -> Result<(), Error>
Source§fn unsubscribe_pool_liquidity_updates(
&mut self,
cmd: &UnsubscribePoolLiquidityUpdates,
) -> Result<(), Error>
fn unsubscribe_pool_liquidity_updates( &mut self, cmd: &UnsubscribePoolLiquidityUpdates, ) -> Result<(), Error>
Source§fn request_data(&self, request: &RequestCustomData) -> Result<(), Error>
fn request_data(&self, request: &RequestCustomData) -> Result<(), Error>
Source§fn request_instrument(&self, request: &RequestInstrument) -> Result<(), Error>
fn request_instrument(&self, request: &RequestInstrument) -> Result<(), Error>
Source§fn request_book_snapshot(
&self,
request: &RequestBookSnapshot,
) -> Result<(), Error>
fn request_book_snapshot( &self, request: &RequestBookSnapshot, ) -> Result<(), Error>
Source§impl Debug for DatabentoDataClient
impl Debug for DatabentoDataClient
Source§impl<'py> IntoPyObject<'py> for DatabentoDataClient
impl<'py> IntoPyObject<'py> for DatabentoDataClient
Source§type Target = DatabentoDataClient
type Target = DatabentoDataClient
Source§type Output = Bound<'py, <DatabentoDataClient as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <DatabentoDataClient as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for DatabentoDataClient
impl PyClass for DatabentoDataClient
Source§impl PyClassImpl for DatabentoDataClient
impl PyClassImpl for DatabentoDataClient
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§type ThreadChecker = SendablePyClass<DatabentoDataClient>
type ThreadChecker = SendablePyClass<DatabentoDataClient>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
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<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a DatabentoDataClient
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a DatabentoDataClient
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut DatabentoDataClient
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut DatabentoDataClient
Source§impl PyTypeInfo for DatabentoDataClient
impl PyTypeInfo for DatabentoDataClient
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type.impl DerefToPyAny for DatabentoDataClient
Auto Trait Implementations§
impl !Freeze for DatabentoDataClient
impl !RefUnwindSafe for DatabentoDataClient
impl Send for DatabentoDataClient
impl Sync for DatabentoDataClient
impl Unpin for DatabentoDataClient
impl !UnwindSafe for DatabentoDataClient
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self
into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self
into an owned Python object, dropping type information and unbinding it
from the 'py
lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self
into a Python object. Read more