pub struct BithumbConfig {Show 17 fields
pub api_url: SmartString,
pub ws_url: SmartString,
pub timeout: Duration,
pub max_retries: usize,
pub ping_interval: Duration,
pub enable_testnet: bool,
pub rate_limit_window: Duration,
pub rate_limit_per_window: u32,
pub user_agent: SmartString,
pub connection_pool_size: usize,
pub keep_alive_timeout: Duration,
pub enable_logging: bool,
pub enable_metrics: bool,
pub ws_reconnect_attempts: usize,
pub ws_reconnect_delay: Duration,
pub validate_orders: bool,
pub min_order_validation: bool,
}Expand description
Bithumb exchange configuration
Fields§
§api_url: SmartStringAPI base URL
ws_url: SmartStringWebSocket URL
timeout: DurationRequest timeout duration
max_retries: usizeMaximum retry attempts
ping_interval: DurationPing interval for WebSocket
enable_testnet: boolEnable testnet mode
rate_limit_window: DurationRate limit window duration
rate_limit_per_window: u32Rate limit per window
user_agent: SmartStringUser agent string for requests
connection_pool_size: usizeConnection pool settings
keep_alive_timeout: DurationKeep-alive timeout
enable_logging: boolEnable request/response logging
enable_metrics: boolEnable performance metrics
ws_reconnect_attempts: usizeWebSocket reconnection settings
ws_reconnect_delay: DurationDelay between WebSocket reconnection attempts
validate_orders: boolOrder validation settings
min_order_validation: boolEnable minimum order amount validation
Implementations§
Source§impl BithumbConfig
impl BithumbConfig
Sourcepub fn testnet() -> Self
pub fn testnet() -> Self
Create configuration for testnet
§Note
Bithumb does not support a testnet environment. This method returns
a production configuration and logs a warning. Use production() instead.
Sourcepub fn production() -> Self
pub fn production() -> Self
Create configuration for production
Sourcepub fn high_frequency() -> Self
pub fn high_frequency() -> Self
Create configuration for high-frequency trading
Sourcepub fn with_api_url(self, url: impl Into<SmartString>) -> Self
pub fn with_api_url(self, url: impl Into<SmartString>) -> Self
Set API URL
Sourcepub fn with_ws_url(self, url: impl Into<SmartString>) -> Self
pub fn with_ws_url(self, url: impl Into<SmartString>) -> Self
Set WebSocket URL
Sourcepub const fn with_timeout(self, timeout: Duration) -> Self
pub const fn with_timeout(self, timeout: Duration) -> Self
Set timeout
Sourcepub const fn with_max_retries(self, max_retries: usize) -> Self
pub const fn with_max_retries(self, max_retries: usize) -> Self
Set maximum retries
Sourcepub const fn with_ping_interval(self, interval: Duration) -> Self
pub const fn with_ping_interval(self, interval: Duration) -> Self
Set ping interval
Sourcepub fn with_testnet(self, enable: bool) -> BithumbResult<Self>
pub fn with_testnet(self, enable: bool) -> BithumbResult<Self>
Enable testnet mode
Sourcepub const fn with_rate_limit(self, window: Duration, per_window: u32) -> Self
pub const fn with_rate_limit(self, window: Duration, per_window: u32) -> Self
Set rate limiting
Sourcepub fn with_user_agent(self, user_agent: impl Into<SmartString>) -> Self
pub fn with_user_agent(self, user_agent: impl Into<SmartString>) -> Self
Set user agent
Sourcepub const fn with_connection_pool_size(self, size: usize) -> Self
pub const fn with_connection_pool_size(self, size: usize) -> Self
Set connection pool size
Sourcepub const fn with_logging(self, enable: bool) -> Self
pub const fn with_logging(self, enable: bool) -> Self
Enable logging
Sourcepub const fn with_metrics(self, enable: bool) -> Self
pub const fn with_metrics(self, enable: bool) -> Self
Enable metrics
Sourcepub const fn with_ws_reconnect(self, attempts: usize, delay: Duration) -> Self
pub const fn with_ws_reconnect(self, attempts: usize, delay: Duration) -> Self
Set WebSocket reconnection settings
Sourcepub const fn with_order_validation(
self,
validate: bool,
min_validate: bool,
) -> Self
pub const fn with_order_validation( self, validate: bool, min_validate: bool, ) -> Self
Set order validation
Source§impl BithumbConfig
Helper functions for configuration
impl BithumbConfig
Helper functions for configuration
Sourcepub fn is_symbol_supported(&self, symbol: &str) -> bool
pub fn is_symbol_supported(&self, symbol: &str) -> bool
Check if symbol is supported
Sourcepub fn get_min_order_amount(&self, symbol: &str) -> Option<u64>
pub fn get_min_order_amount(&self, symbol: &str) -> Option<u64>
Get minimum order amount for symbol
Sourcepub fn get_api_url(&self) -> BithumbResult<&SmartString>
pub fn get_api_url(&self) -> BithumbResult<&SmartString>
Get effective API URL based on testnet setting
Sourcepub fn get_ws_url(&self) -> BithumbResult<&SmartString>
pub fn get_ws_url(&self) -> BithumbResult<&SmartString>
Get effective WebSocket URL based on testnet setting
Sourcepub const fn get_http_timeout(&self) -> Duration
pub const fn get_http_timeout(&self) -> Duration
Get HTTP client timeout
Sourcepub const fn get_ws_ping_interval(&self) -> Duration
pub const fn get_ws_ping_interval(&self) -> Duration
Get WebSocket ping interval
Sourcepub const fn get_rate_limit_settings(&self) -> (Duration, u32)
pub const fn get_rate_limit_settings(&self) -> (Duration, u32)
Get rate limit settings
Sourcepub const fn get_connection_pool_settings(&self) -> (usize, Duration)
pub const fn get_connection_pool_settings(&self) -> (usize, Duration)
Get connection pool settings
Sourcepub const fn get_ws_reconnect_settings(&self) -> (usize, Duration)
pub const fn get_ws_reconnect_settings(&self) -> (usize, Duration)
Get WebSocket reconnection settings
Trait Implementations§
Source§impl Clone for BithumbConfig
impl Clone for BithumbConfig
Source§fn clone(&self) -> BithumbConfig
fn clone(&self) -> BithumbConfig
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more