pub struct BitgetAccount { /* private fields */ }Implementations§
Source§impl BitgetAccount
impl BitgetAccount
pub fn new(client: BitgetClient) -> Self
pub fn from_env() -> Result<Self, Error>
pub async fn get_accounts( &self, product_type: &str, ) -> Result<Vec<Account>, Error>
pub async fn get_single_account( &self, symbol: &str, product_type: &str, margin_coin: &str, ) -> Result<Value, Error>
pub async fn get_all_positions( &self, product_type: &str, margin_coin: Option<&str>, ) -> Result<Value, Error>
pub async fn get_history_positions( &self, request: HistoryPositionRequest, ) -> Result<HistoricalPositionPage, Error>
pub async fn get_bills( &self, product_type: &str, coin: Option<&str>, business_type: Option<&str>, ) -> Result<Value, Error>
pub async fn get_account_bills( &self, request: AccountBillRequest, ) -> Result<Value, Error>
pub async fn set_leverage( &self, symbol: &str, product_type: &str, margin_coin: &str, leverage: &str, ) -> Result<Value, Error>
pub async fn set_margin_mode( &self, symbol: &str, product_type: &str, margin_coin: &str, margin_mode: &str, ) -> Result<Value, Error>
pub async fn set_position_mode( &self, product_type: &str, pos_mode: &str, ) -> Result<Value, Error>
pub async fn set_position_margin( &self, symbol: &str, product_type: &str, margin_coin: &str, amount: &str, hold_side: &str, ) -> Result<Value, Error>
pub async fn set_asset_mode( &self, product_type: &str, asset_mode: &str, ) -> Result<Value, Error>
pub async fn get_sub_account_assets( &self, product_type: &str, ) -> Result<Vec<SubAccountAssets>, Error>
pub async fn get_trade_rate( &self, symbol: &str, business_type: &str, ) -> Result<Value, Error>
pub async fn get_trade_rate_info( &self, symbol: &str, business_type: &str, ) -> Result<TradeRate, Error>
Trait Implementations§
Source§impl Clone for BitgetAccount
impl Clone for BitgetAccount
Source§fn clone(&self) -> BitgetAccount
fn clone(&self) -> BitgetAccount
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for BitgetAccount
impl !UnwindSafe for BitgetAccount
impl Freeze for BitgetAccount
impl Send for BitgetAccount
impl Sync for BitgetAccount
impl Unpin for BitgetAccount
impl UnsafeUnpin for BitgetAccount
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