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_instrument(&mut self, cmd: SubscribeInstrument) -> Result<()>
fn subscribe_instrument(&mut self, cmd: SubscribeInstrument) -> Result<()>
Subscribes to instrument definition data for the specified instrument.
§Errors
Returns an error if the subscription request fails.
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<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn disconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + '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.