pub struct DeribitExecClientConfig {
pub trader_id: TraderId,
pub account_id: AccountId,
pub api_key: Option<String>,
pub api_secret: Option<String>,
pub instrument_kinds: Vec<DeribitInstrumentKind>,
pub base_url_http: Option<String>,
pub base_url_ws: Option<String>,
pub use_testnet: bool,
pub http_timeout_secs: Option<u64>,
pub max_retries: Option<u32>,
pub retry_delay_initial_ms: Option<u64>,
pub retry_delay_max_ms: Option<u64>,
}Expand description
Configuration for the Deribit execution client.
Fields§
§trader_id: TraderIdThe trader ID for this client.
account_id: AccountIdThe account ID for this client.
api_key: Option<String>Optional API key for authenticated endpoints.
api_secret: Option<String>Optional API secret for authenticated endpoints.
instrument_kinds: Vec<DeribitInstrumentKind>Instrument kinds to load (e.g., Future, Option, Spot).
base_url_http: Option<String>Optional override for the HTTP base URL.
base_url_ws: Option<String>Optional override for the WebSocket URL.
use_testnet: boolWhen true the client will use Deribit testnet endpoints.
http_timeout_secs: Option<u64>Optional HTTP timeout in seconds.
max_retries: Option<u32>Optional maximum retry attempts for requests.
retry_delay_initial_ms: Option<u64>Optional initial retry delay in milliseconds.
retry_delay_max_ms: Option<u64>Optional maximum retry delay in milliseconds.
Implementations§
Source§impl DeribitExecClientConfig
impl DeribitExecClientConfig
Sourcepub fn new(trader_id: TraderId, account_id: AccountId) -> Self
pub fn new(trader_id: TraderId, account_id: AccountId) -> Self
Creates a new configuration with default settings.
Sourcepub fn has_api_credentials(&self) -> bool
pub fn has_api_credentials(&self) -> bool
Returns true when API credentials are available (in config or env vars).
Sourcepub fn http_base_url(&self) -> String
pub fn http_base_url(&self) -> String
Returns the HTTP base URL, falling back to the default when unset.
Trait Implementations§
Source§impl ClientConfig for DeribitExecClientConfig
impl ClientConfig for DeribitExecClientConfig
Source§impl Clone for DeribitExecClientConfig
impl Clone for DeribitExecClientConfig
Source§fn clone(&self) -> DeribitExecClientConfig
fn clone(&self) -> DeribitExecClientConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeribitExecClientConfig
impl Debug for DeribitExecClientConfig
Auto Trait Implementations§
impl Freeze for DeribitExecClientConfig
impl RefUnwindSafe for DeribitExecClientConfig
impl Send for DeribitExecClientConfig
impl Sync for DeribitExecClientConfig
impl Unpin for DeribitExecClientConfig
impl UnwindSafe for DeribitExecClientConfig
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
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>
Converts
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>
Converts
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