pub struct BinanceOptions {
pub adjust_for_time_difference: bool,
pub recv_window: u64,
pub default_type: DefaultType,
pub default_sub_type: Option<DefaultSubType>,
pub test: bool,
pub time_sync_interval_secs: u64,
pub auto_time_sync: bool,
pub rate_limit: u32,
}Expand description
Binance-specific options.
§Example
use ccxt_exchanges::binance::BinanceOptions;
use ccxt_core::types::default_type::{DefaultType, DefaultSubType};
let options = BinanceOptions {
default_type: DefaultType::Swap,
default_sub_type: Some(DefaultSubType::Linear),
..Default::default()
};Fields§
§adjust_for_time_difference: boolEnables time synchronization.
recv_window: u64Receive window in milliseconds.
default_type: DefaultTypeDefault trading type (spot/margin/swap/futures/option).
This determines which API endpoints to use for operations.
Supports both DefaultType enum and string values for backward compatibility.
default_sub_type: Option<DefaultSubType>Default sub-type for contract settlement (linear/inverse).
Linear: USDT-margined contracts (FAPI)Inverse: Coin-margined contracts (DAPI)
Only applicable when default_type is Swap, Futures, or Option.
Ignored for Spot and Margin types.
test: boolEnables testnet mode.
time_sync_interval_secs: u64Time sync interval in seconds.
Controls how often the time offset is refreshed when auto sync is enabled. Default: 30 seconds.
auto_time_sync: boolEnable automatic periodic time sync.
When enabled, the time offset will be automatically refreshed
based on time_sync_interval_secs.
Default: true.
rate_limit: u32Rate limit in requests per second.
Default: 50.
Trait Implementations§
Source§impl Clone for BinanceOptions
impl Clone for BinanceOptions
Source§fn clone(&self) -> BinanceOptions
fn clone(&self) -> BinanceOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more