pub struct CoinApiDataClientConfig {Show 15 fields
pub api_key: Option<SecretString>,
pub base_url_http: Option<String>,
pub base_url_ws: Option<String>,
pub proxy_url: Option<SecretString>,
pub instruments: Vec<CoinApiInstrumentSelection>,
pub credit_budget: u64,
pub max_retries: u32,
pub http_timeout_secs: u64,
pub max_concurrent_requests: usize,
pub retry_delay_initial_ms: u64,
pub retry_delay_max_ms: u64,
pub retry_max_elapsed_ms: u64,
pub transport_backend: TransportBackend,
pub book_snapshot_timeout_secs: u64,
pub price_precisions: HashMap<InstrumentId, u8>,
}Expand description
Configuration for CoinApiDataClient.
Fields§
§api_key: Option<SecretString>API key; None falls back to the COINAPI_API_KEY environment variable.
base_url_http: Option<String>Optional override for the REST base URL, including its version prefix.
base_url_ws: Option<String>Optional override for the WebSocket URL.
proxy_url: Option<SecretString>Optional explicit proxy URL for HTTP and WebSocket transports.
instruments: Vec<CoinApiInstrumentSelection>Instruments loaded on connect and served by instrument requests.
credit_budget: u64Conservative lifetime REST credit allowance for this client; see CoinApiHttpConfig.
max_retries: u32Maximum retries for a failed REST request.
http_timeout_secs: u64Positive per-attempt REST timeout in seconds, including concurrency admission.
max_concurrent_requests: usizeMaximum simultaneous REST requests for this client instance.
retry_delay_initial_ms: u64Initial REST retry delay in milliseconds.
retry_delay_max_ms: u64Maximum REST retry backoff in milliseconds; provider retry delays can exceed it.
retry_max_elapsed_ms: u64Positive total REST elapsed budget in milliseconds, including admission and retries.
transport_backend: TransportBackendWebSocket transport backend.
book_snapshot_timeout_secs: u64Seconds to wait for an order book snapshot after a subscription, reconnect, or recovery request; zero disables the deadline.
price_precisions: HashMap<InstrumentId, u8>Price precision by selected instrument, replacing the CoinAPI price resolution when it is coarser than the prices the venue quotes.
Implementations§
Source§impl CoinApiDataClientConfig
impl CoinApiDataClientConfig
Sourcepub fn builder() -> CoinApiDataClientConfigBuilder
pub fn builder() -> CoinApiDataClientConfigBuilder
Create an instance of CoinApiDataClientConfig using the builder syntax
Source§impl CoinApiDataClientConfig
impl CoinApiDataClientConfig
Sourcepub fn http_config(&self) -> CoinApiHttpConfig
pub fn http_config(&self) -> CoinApiHttpConfig
Returns the REST transport configuration, applying overrides to the defaults.
Sourcepub fn websocket_config(&self) -> CoinApiWebSocketConfig
pub fn websocket_config(&self) -> CoinApiWebSocketConfig
Returns the WebSocket transport configuration, applying overrides to the defaults.
Trait Implementations§
Source§impl ClientConfig for CoinApiDataClientConfig
impl ClientConfig for CoinApiDataClientConfig
Source§impl Clone for CoinApiDataClientConfig
impl Clone for CoinApiDataClientConfig
Source§impl Debug for CoinApiDataClientConfig
impl Debug for CoinApiDataClientConfig
Source§impl Default for CoinApiDataClientConfig
impl Default for CoinApiDataClientConfig
impl DerefToPyAny for CoinApiDataClientConfig
Source§impl<'de> Deserialize<'de> for CoinApiDataClientConfigwhere
CoinApiDataClientConfig: Default,
impl<'de> Deserialize<'de> for CoinApiDataClientConfigwhere
CoinApiDataClientConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'a, 'py> FromPyObject<'a, 'py> for CoinApiDataClientConfigwhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for CoinApiDataClientConfigwhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for CoinApiDataClientConfig
impl<'py> IntoPyObject<'py> for CoinApiDataClientConfig
Source§type Target = CoinApiDataClientConfig
type Target = CoinApiDataClientConfig
Source§type Output = Bound<'py, <CoinApiDataClientConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <CoinApiDataClientConfig 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 CoinApiDataClientConfig
impl PyClass for CoinApiDataClientConfig
Source§impl PyClassImpl for CoinApiDataClientConfig
impl PyClassImpl for CoinApiDataClientConfig
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§const RAW_DOC: &'static CStr = /// Configuration for [`CoinApiDataClient`](crate::data::CoinApiDataClient).
const RAW_DOC: &'static CStr = /// Configuration for [`CoinApiDataClient`](crate::data::CoinApiDataClient).
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<CoinApiDataClientConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<CoinApiDataClientConfig>
type Layout = <<CoinApiDataClientConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<CoinApiDataClientConfig>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForCoinApiDataClientConfig
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<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for CoinApiDataClientConfig
impl PyClassNewTextSignature for CoinApiDataClientConfig
const TEXT_SIGNATURE: &'static str = "(api_key=None, base_url_http=None, base_url_ws=None, instruments=None, credit_budget=None, max_retries=None, transport_backend=None, book_snapshot_timeout_secs=None, price_precisions=None, proxy_url=None, http_timeout_secs=None, max_concurrent_requests=None, retry_delay_initial_ms=None, retry_delay_max_ms=None, retry_max_elapsed_ms=None)"
Source§impl PyStubType for CoinApiDataClientConfig
impl PyStubType for CoinApiDataClientConfig
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for CoinApiDataClientConfig
impl PyTypeInfo for CoinApiDataClientConfig
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
Source§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
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.Auto Trait Implementations§
impl Freeze for CoinApiDataClientConfig
impl RefUnwindSafe for CoinApiDataClientConfig
impl Send for CoinApiDataClientConfig
impl Sync for CoinApiDataClientConfig
impl Unpin for CoinApiDataClientConfig
impl UnsafeUnpin for CoinApiDataClientConfig
impl UnwindSafe for CoinApiDataClientConfig
Blanket Implementations§
impl<T> Allocation for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<'py, T> FromPyObjectOwned<'py> for Twhere
T: for<'a> FromPyObject<'a, 'py>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
§fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>where
Self: IntoPyObject<'py, Error = !>,
fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>where
Self: IntoPyObject<'py, Error = !>,
self into a [Py<PyAny>] when the underlying conversion is infallible.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§fn type_check(object: &Bound<'_, PyAny>) -> bool
fn type_check(object: &Bound<'_, PyAny>) -> bool
§fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
isinstance and issubclass function. Read more