pub struct AccountScope { /* private fields */ }Expand description
What AccountState::load and AccountState::reload fetch.
use bybit::{AccountScope, AccountType};
// USDT perpetuals, spot orders and the unified wallet.
let scope = AccountScope::new()
.linear("USDT")
.spot()
.wallet(AccountType::UNIFIED);Implementations§
Source§impl AccountScope
impl AccountScope
Sourcepub fn linear(self, settle_coin: impl Into<String>) -> Self
pub fn linear(self, settle_coin: impl Into<String>) -> Self
Linear contracts settled in settle_coin (Bybit requires a settle
coin to list all linear orders and positions), e.g. “USDT” or “USDC”.
Sourcepub fn category(self, category: Category, settle_coin: Option<String>) -> Self
pub fn category(self, category: Category, settle_coin: Option<String>) -> Self
Any category, with an optional settle coin filter.
Sourcepub fn wallet(self, account_type: AccountType) -> Self
pub fn wallet(self, account_type: AccountType) -> Self
Also load the wallet balance of account_type.
Trait Implementations§
Source§impl Clone for AccountScope
impl Clone for AccountScope
Source§impl Debug for AccountScope
impl Debug for AccountScope
Auto Trait Implementations§
impl Freeze for AccountScope
impl RefUnwindSafe for AccountScope
impl Send for AccountScope
impl Sync for AccountScope
impl Unpin for AccountScope
impl UnsafeUnpin for AccountScope
impl UnwindSafe for AccountScope
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