pub struct AccountHTTP { /* private fields */ }Trait Implementations§
Source§impl Account for AccountHTTP
impl Account for AccountHTTP
Source§fn new(http_manager: Arc<HttpManager>) -> Self
fn new(http_manager: Arc<HttpManager>) -> Self
Initialize the AccountHTTP by passing the HttpManager
Source§fn get_wallet_balance<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_wallet_balance<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Obtain wallet balance, query asset information of each currency, and account risk rate information under unified margin mode. By default, currency information with assets or liabilities of 0 is not returned. Required args: accountType (string): Account type Unified account: UNIFIED Normal account: CONTRACT Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/wallet-balance
Source§fn upgrade_to_unified_trading_account<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upgrade_to_unified_trading_account<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upgrade Unified Account Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/upgrade-unified-account
Source§fn get_borrow_history<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_borrow_history<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get interest records, sorted in reverse order of creation time. Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/borrow-history
Source§fn get_collateral_info<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_collateral_info<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the collateral information of the current unified margin account, including loan interest rate, loanable amount, collateral conversion rate, whether it can be mortgaged as margin, etc. Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/collateral-info
Source§fn get_coin_greeks<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_coin_greeks<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get current account Greeks information Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/coin-greeks
Source§fn get_fee_rates<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_fee_rates<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the trading fee rate of derivatives. Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/fee-rate
Source§fn get_account_info<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_info<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Query the margin mode configuration of the account. Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/account-info
Source§fn get_transaction_log<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_log<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Query transaction logs in Unified account. Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/transaction-log
Source§fn set_margin_mode<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_margin_mode<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Default is regular margin mode. This mode is valid for USDT Perp, USDC Perp and USDC Option. Required args: setMarginMode (string): REGULAR_MARGIN, PORTFOLIO_MARGIN Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/set-margin-mode
Source§fn set_mmp<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_mmp<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Market Maker Protection (MMP) is an automated mechanism designed to protect market makers (MM) against liquidity risks and over-exposure in the market. It prevents simultaneous trade executions on quotes provided by the MM within a short time span. The MM can automatically pull their quotes if the number of contracts traded for an underlying asset exceeds the configured threshold within a certain time frame. Once MMP is triggered, any pre-existing MMP orders will be automatically canceled, and new orders tagged as MMP will be rejected for a specific duration — known as the frozen period — so that MM can reassess the market and modify the quotes. Required args: baseCoin (strin): Base coin window (string): Time window (ms) frozenPeriod (string): Frozen period (ms). “0” means the trade will remain frozen until manually reset qtyLimit (string): Trade qty limit (positive and up to 2 decimal places) deltaLimit (string): Delta limit (positive and up to 2 decimal places) Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/set-mmp
Source§fn reset_mmp<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reset_mmp<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Once the mmp triggered, you can unfreeze the account by this endpoint Required args: baseCoin (string): Base coin Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/reset-mmp
Source§fn get_mmp_state<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_mmp_state<'life0, 'async_trait>(
&'life0 self,
query: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get MMP state Required args: baseCoin (string): Base coin Returns: Request results as HashMap. Additional information: https://bybit-exchange.github.io/docs/v5/account/get-mmp-state
Auto Trait Implementations§
impl Freeze for AccountHTTP
impl !RefUnwindSafe for AccountHTTP
impl Send for AccountHTTP
impl Sync for AccountHTTP
impl Unpin for AccountHTTP
impl UnsafeUnpin for AccountHTTP
impl !UnwindSafe for AccountHTTP
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more