Struct binance::futures::account::FuturesAccount
source · pub struct FuturesAccount {
pub client: Client,
pub recv_window: u64,
}
Fields§
§client: Client
§recv_window: u64
Implementations§
source§impl FuturesAccount
impl FuturesAccount
sourcepub async fn get_order(
&self,
order: Option<GetOrderRequest>
) -> Result<Transaction>
pub async fn get_order( &self, order: Option<GetOrderRequest> ) -> Result<Transaction>
Get an order
sourcepub async fn place_order(&self, order: OrderRequest) -> Result<Transaction>
pub async fn place_order(&self, order: OrderRequest) -> Result<Transaction>
Place an order
sourcepub async fn get_open_orders(
&self,
symbol: impl Into<String>
) -> Result<Vec<Order>>
pub async fn get_open_orders( &self, symbol: impl Into<String> ) -> Result<Vec<Order>>
Get currently open orders
sourcepub async fn place_order_test(&self, order: OrderRequest) -> Result<Transaction>
pub async fn place_order_test(&self, order: OrderRequest) -> Result<Transaction>
Place a test order
sourcepub async fn limit_buy(
&self,
symbol: impl Into<String>,
qty: impl Into<f64>,
price: f64,
time_in_force: TimeInForce
) -> Result<Transaction>
pub async fn limit_buy( &self, symbol: impl Into<String>, qty: impl Into<f64>, price: f64, time_in_force: TimeInForce ) -> Result<Transaction>
Place a limit buy order
sourcepub async fn limit_sell(
&self,
symbol: impl Into<String>,
qty: impl Into<f64>,
price: f64,
time_in_force: TimeInForce
) -> Result<Transaction>
pub async fn limit_sell( &self, symbol: impl Into<String>, qty: impl Into<f64>, price: f64, time_in_force: TimeInForce ) -> Result<Transaction>
Place a limit sell order
sourcepub async fn market_buy<S, F>(&self, symbol: S, qty: F) -> Result<Transaction>
pub async fn market_buy<S, F>(&self, symbol: S, qty: F) -> Result<Transaction>
Place a Market buy order
sourcepub async fn market_sell<S, F>(&self, symbol: S, qty: F) -> Result<Transaction>
pub async fn market_sell<S, F>(&self, symbol: S, qty: F) -> Result<Transaction>
Place a Market sell order
sourcepub async fn cancel_order(&self, o: OrderCancellation) -> Result<CanceledOrder>
pub async fn cancel_order(&self, o: OrderCancellation) -> Result<CanceledOrder>
Place a cancellation order
sourcepub async fn position_information<S>(&self, symbol: S) -> Result<Vec<Position>>
pub async fn position_information<S>(&self, symbol: S) -> Result<Vec<Position>>
Get current position risk for the symbol
sourcepub async fn account_information(&self) -> Result<AccountInformation>
pub async fn account_information(&self) -> Result<AccountInformation>
Return general AccountInformation
sourcepub async fn account_balance(&self) -> Result<Vec<AccountBalance>>
pub async fn account_balance(&self) -> Result<Vec<AccountBalance>>
Return account’s AccountBalance
sourcepub async fn change_initial_leverage<S>(
&self,
symbol: S,
leverage: u8
) -> Result<ChangeLeverageResponse>
pub async fn change_initial_leverage<S>( &self, symbol: S, leverage: u8 ) -> Result<ChangeLeverageResponse>
Change the initial leverage for the symbol
sourcepub async fn change_position_mode(&self, dual_side_position: bool) -> Result<()>
pub async fn change_position_mode(&self, dual_side_position: bool) -> Result<()>
Change the dual position side
Trait Implementations§
source§impl Binance for FuturesAccount
impl Binance for FuturesAccount
fn new_with_config( api_key: Option<String>, secret_key: Option<String>, config: &Config ) -> Self
fn new(api_key: Option<String>, secret_key: Option<String>) -> Self
source§fn new_with_env(config: &Config) -> Self
fn new_with_env(config: &Config) -> Self
Create a binance API using environment variables for credentials
BINANCE_API_KEY=$YOUR_API_KEY
BINANCE_API_SECRET_KEY=$YOUR_SECRET_KEY
source§impl Clone for FuturesAccount
impl Clone for FuturesAccount
source§fn clone(&self) -> FuturesAccount
fn clone(&self) -> FuturesAccount
Returns a copy 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 moreAuto Trait Implementations§
impl !RefUnwindSafe for FuturesAccount
impl Send for FuturesAccount
impl Sync for FuturesAccount
impl Unpin for FuturesAccount
impl !UnwindSafe for FuturesAccount
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