pub struct DatabentoHistoricalClient {
pub key: String,
/* private fields */
}Expand description
Core Databento historical client for fetching historical market data.
This client provides both synchronous and asynchronous interfaces for fetching various types of historical market data from Databento.
Fields§
§key: StringImplementations§
Source§impl DatabentoHistoricalClient
impl DatabentoHistoricalClient
Sourcepub fn new(
key: String,
publishers_filepath: PathBuf,
clock: &'static AtomicTime,
use_exchange_as_venue: bool,
) -> Result<Self>
pub fn new( key: String, publishers_filepath: PathBuf, clock: &'static AtomicTime, use_exchange_as_venue: bool, ) -> Result<Self>
Creates a new DatabentoHistoricalClient instance.
§Errors
Returns an error if client creation or publisher loading fails.
Sourcepub async fn get_dataset_range(&self, dataset: &str) -> Result<DatasetRange>
pub async fn get_dataset_range(&self, dataset: &str) -> Result<DatasetRange>
Sourcepub async fn get_range_instruments(
&self,
params: RangeQueryParams,
) -> Result<Vec<InstrumentAny>>
pub async fn get_range_instruments( &self, params: RangeQueryParams, ) -> Result<Vec<InstrumentAny>>
Fetches instrument definitions for the given parameters.
§Errors
Returns an error if the API request or data processing fails.
Sourcepub async fn get_range_quotes(
&self,
params: RangeQueryParams,
schema: Option<String>,
) -> Result<Vec<QuoteTick>>
pub async fn get_range_quotes( &self, params: RangeQueryParams, schema: Option<String>, ) -> Result<Vec<QuoteTick>>
Fetches quote ticks for the given parameters.
§Errors
Returns an error if the API request or data processing fails.
Sourcepub async fn get_range_order_book_depth10(
&self,
params: RangeQueryParams,
depth: Option<usize>,
) -> Result<Vec<OrderBookDepth10>>
pub async fn get_range_order_book_depth10( &self, params: RangeQueryParams, depth: Option<usize>, ) -> Result<Vec<OrderBookDepth10>>
Fetches order book depth10 snapshots for the given parameters.
§Errors
Returns an error if the API request or data processing fails.
Sourcepub async fn get_range_trades(
&self,
params: RangeQueryParams,
) -> Result<Vec<TradeTick>>
pub async fn get_range_trades( &self, params: RangeQueryParams, ) -> Result<Vec<TradeTick>>
Fetches trade ticks for the given parameters.
§Errors
Returns an error if the API request or data processing fails.
Sourcepub async fn get_range_bars(
&self,
params: RangeQueryParams,
aggregation: BarAggregation,
timestamp_on_close: bool,
) -> Result<Vec<Bar>>
pub async fn get_range_bars( &self, params: RangeQueryParams, aggregation: BarAggregation, timestamp_on_close: bool, ) -> Result<Vec<Bar>>
Fetches bars for the given parameters.
§Errors
Returns an error if the API request or data processing fails.
Sourcepub async fn get_range_imbalance(
&self,
params: RangeQueryParams,
) -> Result<Vec<DatabentoImbalance>>
pub async fn get_range_imbalance( &self, params: RangeQueryParams, ) -> Result<Vec<DatabentoImbalance>>
Fetches imbalance data for the given parameters.
§Errors
Returns an error if the API request or data processing fails.
Sourcepub async fn get_range_statistics(
&self,
params: RangeQueryParams,
) -> Result<Vec<DatabentoStatistics>>
pub async fn get_range_statistics( &self, params: RangeQueryParams, ) -> Result<Vec<DatabentoStatistics>>
Fetches statistics data for the given parameters.
§Errors
Returns an error if the API request or data processing fails.
Sourcepub async fn get_range_status(
&self,
params: RangeQueryParams,
) -> Result<Vec<InstrumentStatus>>
pub async fn get_range_status( &self, params: RangeQueryParams, ) -> Result<Vec<InstrumentStatus>>
Fetches status data for the given parameters.
§Errors
Returns an error if the API request or data processing fails.
Trait Implementations§
Source§impl Clone for DatabentoHistoricalClient
impl Clone for DatabentoHistoricalClient
Source§fn clone(&self) -> DatabentoHistoricalClient
fn clone(&self) -> DatabentoHistoricalClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DatabentoHistoricalClient
impl !RefUnwindSafe for DatabentoHistoricalClient
impl Send for DatabentoHistoricalClient
impl Sync for DatabentoHistoricalClient
impl Unpin for DatabentoHistoricalClient
impl !UnwindSafe for DatabentoHistoricalClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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