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 more