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,
}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.
Trait Implementations§
Source§impl Clone for BinanceOptions
impl Clone for BinanceOptions
Source§fn clone(&self) -> BinanceOptions
fn clone(&self) -> BinanceOptions
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 BinanceOptions
impl Debug for BinanceOptions
Source§impl Default for BinanceOptions
impl Default for BinanceOptions
Source§impl<'de> Deserialize<'de> for BinanceOptions
impl<'de> Deserialize<'de> for BinanceOptions
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BinanceOptions
impl RefUnwindSafe for BinanceOptions
impl Send for BinanceOptions
impl Sync for BinanceOptions
impl Unpin for BinanceOptions
impl UnwindSafe for BinanceOptions
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