pub struct HttpApiV3Client { /* private fields */ }Expand description
The Binance API v3 HTTP client.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new_with_auth(api_key: String, secret_key: String) -> Self
pub fn new_with_auth(api_key: String, secret_key: String) -> Self
Creates an authorized client instance.
Sourcepub fn time(&self) -> Result<TimeGetResponse, Error>
pub fn time(&self) -> Result<TimeGetResponse, Error>
Test connectivity to the Rest API and get the current server time.
Sourcepub fn exchange_info(&self) -> Result<ExchangeInfoGetResponse, Error>
pub fn exchange_info(&self) -> Result<ExchangeInfoGetResponse, Error>
Current exchange trading rules and symbol information.
Sourcepub fn klines(
&self,
request: KlinesGetQuery,
) -> Result<KlinesGetResponse, Error>
pub fn klines( &self, request: KlinesGetQuery, ) -> Result<KlinesGetResponse, Error>
Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.
Sourcepub fn depth(&self, request: DepthGetQuery) -> Result<DepthGetResponse, Error>
pub fn depth(&self, request: DepthGetQuery) -> Result<DepthGetResponse, Error>
The real-time market depth.
Sourcepub fn account_get(
&self,
request: AccountGetQuery,
) -> Result<AccountGetResponse, Error>
pub fn account_get( &self, request: AccountGetQuery, ) -> Result<AccountGetResponse, Error>
Get the account info and balances.
Sourcepub fn open_orders_get(
&self,
request: OpenOrdersGetQuery,
) -> Result<OpenOrdersGetResponse, Error>
pub fn open_orders_get( &self, request: OpenOrdersGetQuery, ) -> Result<OpenOrdersGetResponse, Error>
Get the account open orders.
Sourcepub fn open_orders_delete(
&self,
request: OpenOrdersDeleteQuery,
) -> Result<OpenOrdersDeleteResponse, Error>
pub fn open_orders_delete( &self, request: OpenOrdersDeleteQuery, ) -> Result<OpenOrdersDeleteResponse, Error>
Delete the account open orders.
Sourcepub fn order_get(
&self,
request: OrderGetQuery,
) -> Result<OrderGetResponse, Error>
pub fn order_get( &self, request: OrderGetQuery, ) -> Result<OrderGetResponse, Error>
Check an order’s status.
Sourcepub fn order_post(
&self,
request: OrderPostQuery,
) -> Result<OrderPostResponse, Error>
pub fn order_post( &self, request: OrderPostQuery, ) -> Result<OrderPostResponse, Error>
Send in a new order.
Sourcepub fn order_delete(
&self,
request: OrderDeleteQuery,
) -> Result<OrderDeleteResponse, Error>
pub fn order_delete( &self, request: OrderDeleteQuery, ) -> Result<OrderDeleteResponse, Error>
Cancel an active order.
Sourcepub fn order_post_test(
&self,
request: OrderPostQuery,
) -> Result<OrderPostResponse, Error>
pub fn order_post_test( &self, request: OrderPostQuery, ) -> Result<OrderPostResponse, Error>
Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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