pub struct BybitOptions {
pub account_type: String,
pub default_type: DefaultType,
pub default_sub_type: Option<DefaultSubType>,
pub testnet: bool,
pub recv_window: u64,
}Expand description
Bybit-specific options.
§Example
use ccxt_exchanges::bybit::BybitOptions;
use ccxt_core::types::default_type::{DefaultType, DefaultSubType};
let options = BybitOptions {
default_type: DefaultType::Swap,
default_sub_type: Some(DefaultSubType::Linear),
..Default::default()
};Fields§
§account_type: StringAccount type: UNIFIED, CONTRACT, SPOT.
This is kept for backward compatibility with existing configurations.
default_type: DefaultTypeDefault trading type (spot/swap/futures/option).
This determines which category to use for API calls. Bybit uses a unified V5 API with category-based filtering:
Spot-> category=spotSwap+ Linear -> category=linearSwap+ Inverse -> category=inverseOption-> category=option
default_sub_type: Option<DefaultSubType>Default sub-type for contract settlement (linear/inverse).
Linear: USDT-margined contracts (category=linear)Inverse: Coin-margined contracts (category=inverse)
Only applicable when default_type is Swap or Futures.
Ignored for Spot and Option types.
testnet: boolEnables testnet environment.
recv_window: u64Receive window in milliseconds.
Trait Implementations§
Source§impl Clone for BybitOptions
impl Clone for BybitOptions
Source§fn clone(&self) -> BybitOptions
fn clone(&self) -> BybitOptions
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 BybitOptions
impl Debug for BybitOptions
Source§impl Default for BybitOptions
impl Default for BybitOptions
Source§impl<'de> Deserialize<'de> for BybitOptions
impl<'de> Deserialize<'de> for BybitOptions
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 BybitOptions
impl RefUnwindSafe for BybitOptions
impl Send for BybitOptions
impl Sync for BybitOptions
impl Unpin for BybitOptions
impl UnwindSafe for BybitOptions
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