pub struct DeribitFixConfig {Show 23 fields
pub username: String,
pub password: String,
pub host: String,
pub port: u16,
pub use_ssl: bool,
pub test_mode: bool,
pub heartbeat_interval: u32,
pub connection_timeout: Duration,
pub reconnect_attempts: u32,
pub reconnect_delay: Duration,
pub enable_logging: bool,
pub log_level: String,
pub sender_comp_id: String,
pub target_comp_id: String,
pub cancel_on_disconnect: bool,
pub app_id: Option<String>,
pub app_secret: Option<String>,
pub use_wordsafe_tags: Option<bool>,
pub deribit_sequential: Option<bool>,
pub unsubscribe_execution_reports: Option<bool>,
pub connection_only_execution_reports: Option<bool>,
pub report_fills_as_exec_reports: Option<bool>,
pub display_increment_steps: Option<bool>,
}Expand description
Configuration for the Deribit FIX client
Fields§
§username: StringDeribit username
password: StringDeribit password
host: StringFIX server host (default: www.deribit.com for production, test.deribit.com for test)
port: u16FIX server port (default: 9881 for test, 9880 for production)
use_ssl: boolWhether to use SSL connection (default: false for raw TCP)
test_mode: boolWhether to use test environment
heartbeat_interval: u32Heartbeat interval in seconds (default: 30)
connection_timeout: DurationConnection timeout in seconds (default: 10)
reconnect_attempts: u32Reconnection attempts (default: 3)
reconnect_delay: DurationReconnection delay in seconds (default: 5)
enable_logging: boolEnable logging (default: true)
log_level: StringLog level filter
sender_comp_id: StringSender company ID for FIX messages
target_comp_id: StringTarget company ID for FIX messages (DERIBITSERVER)
cancel_on_disconnect: boolCancel orders on disconnect (default: false)
app_id: Option<String>Application ID for registered applications
app_secret: Option<String>Application secret for registered applications
Use word-safe tags (custom tags start at 5000 instead of 100000)
deribit_sequential: Option<bool>Enable sequential FIX messaging (single queue for all messages)
unsubscribe_execution_reports: Option<bool>Unsubscribe from notificational Execution Reports
connection_only_execution_reports: Option<bool>Receive Execution Reports only for orders created in this connection
report_fills_as_exec_reports: Option<bool>Report fills as Execution Reports with ExecType = F(TRADE)
display_increment_steps: Option<bool>Include price increment steps in symbol entries
Implementations§
Source§impl DeribitFixConfig
impl DeribitFixConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new configuration from environment variables with optional username and password
Sourcepub fn with_credentials(self, username: String, password: String) -> Self
pub fn with_credentials(self, username: String, password: String) -> Self
Set credentials
Sourcepub fn production() -> Self
pub fn production() -> Self
Create configuration for production environment
Sourcepub fn production_with_credentials(username: String, password: String) -> Self
pub fn production_with_credentials(username: String, password: String) -> Self
Create configuration for production environment with credentials
Sourcepub fn production_ssl() -> Self
pub fn production_ssl() -> Self
Create configuration for production environment with SSL
Sourcepub fn with_endpoint(self, host: String, port: u16) -> Self
pub fn with_endpoint(self, host: String, port: u16) -> Self
Set custom host and port
Sourcepub fn with_heartbeat_interval(self, interval: u32) -> Self
pub fn with_heartbeat_interval(self, interval: u32) -> Self
Set heartbeat interval
Sourcepub fn with_connection_timeout(self, timeout: Duration) -> Self
pub fn with_connection_timeout(self, timeout: Duration) -> Self
Set connection timeout
Sourcepub fn with_reconnection(self, attempts: u32, delay: Duration) -> Self
pub fn with_reconnection(self, attempts: u32, delay: Duration) -> Self
Set reconnection parameters
Sourcepub fn with_logging(self, enabled: bool, level: String) -> Self
pub fn with_logging(self, enabled: bool, level: String) -> Self
Set logging configuration
Sourcepub fn with_session_ids(
self,
sender_comp_id: String,
target_comp_id: String,
) -> Self
pub fn with_session_ids( self, sender_comp_id: String, target_comp_id: String, ) -> Self
Set FIX session identifiers
Sourcepub fn with_cancel_on_disconnect(self, cancel_on_disconnect: bool) -> Self
pub fn with_cancel_on_disconnect(self, cancel_on_disconnect: bool) -> Self
Set cancel on disconnect behavior
Sourcepub fn with_app_credentials(self, app_id: String, app_secret: String) -> Self
pub fn with_app_credentials(self, app_id: String, app_secret: String) -> Self
Set application credentials for registered applications
Set whether to use word-safe tags (custom tags start at 5000 instead of 100000)
Sourcepub fn with_deribit_sequential(self, deribit_sequential: bool) -> Self
pub fn with_deribit_sequential(self, deribit_sequential: bool) -> Self
Set whether to enable sequential FIX messaging (single queue for all messages)
Sourcepub fn with_unsubscribe_execution_reports(self, unsubscribe: bool) -> Self
pub fn with_unsubscribe_execution_reports(self, unsubscribe: bool) -> Self
Set whether to unsubscribe from notificational Execution Reports
Sourcepub fn with_connection_only_execution_reports(
self,
connection_only: bool,
) -> Self
pub fn with_connection_only_execution_reports( self, connection_only: bool, ) -> Self
Set whether to receive Execution Reports only for orders created in this connection
Sourcepub fn with_report_fills_as_exec_reports(self, report_fills: bool) -> Self
pub fn with_report_fills_as_exec_reports(self, report_fills: bool) -> Self
Set whether to report fills as Execution Reports with ExecType = F(TRADE)
Sourcepub fn with_display_increment_steps(self, display_steps: bool) -> Self
pub fn with_display_increment_steps(self, display_steps: bool) -> Self
Set whether to include price increment steps in symbol entries
Sourcepub fn connection_url(&self) -> String
pub fn connection_url(&self) -> String
Get the connection URL
Trait Implementations§
Source§impl Clone for DeribitFixConfig
impl Clone for DeribitFixConfig
Source§fn clone(&self) -> DeribitFixConfig
fn clone(&self) -> DeribitFixConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeribitFixConfig
impl Debug for DeribitFixConfig
Source§impl Default for DeribitFixConfig
impl Default for DeribitFixConfig
Source§impl<'de> Deserialize<'de> for DeribitFixConfig
impl<'de> Deserialize<'de> for DeribitFixConfig
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 Display for DeribitFixConfig
impl Display for DeribitFixConfig
Auto Trait Implementations§
impl Freeze for DeribitFixConfig
impl RefUnwindSafe for DeribitFixConfig
impl Send for DeribitFixConfig
impl Sync for DeribitFixConfig
impl Unpin for DeribitFixConfig
impl UnwindSafe for DeribitFixConfig
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.