pub struct BaseClient {
pub transport: Transport,
}Expand description
The openlimits-binance client
Fields§
§transport: TransportImplementations§
Source§impl BaseClient
impl BaseClient
pub async fn get_account(&self) -> Result<AccountInformation>
pub async fn get_balance(&self, asset: &str) -> Result<Balance>
pub async fn get_open_orders(&self, symbol: &str) -> Result<Vec<Order>>
pub async fn get_all_open_orders(&self) -> Result<Vec<Order>>
pub async fn get_all_orders(&self, params: &AllOrderReq) -> Result<Vec<Order>>
pub async fn get_order(&self, symbol: &str, order_id: u64) -> Result<Order>
pub async fn limit_buy( &self, pair: MarketPairInfo, qty: Decimal, price: Decimal, tif: TimeInForce, post_only: bool, ) -> Result<Order>
pub async fn limit_sell( &self, pair: MarketPairInfo, qty: Decimal, price: Decimal, tif: TimeInForce, post_only: bool, ) -> Result<Order>
pub async fn market_buy( &self, pair: MarketPairInfo, qty: Decimal, ) -> Result<Order>
pub async fn market_sell( &self, pair: MarketPairInfo, qty: Decimal, ) -> Result<Order>
pub async fn cancel_order( &self, symbol: &str, order_id: u64, ) -> Result<OrderCanceled>
pub async fn cancel_all_orders<P: Into<MarketPair>>( &self, symbol: P, ) -> Result<Vec<OrderCanceled>>
pub async fn trade_history( &self, params: &TradeHistoryReq, ) -> Result<Vec<TradeHistory>>
Source§impl BaseClient
impl BaseClient
pub async fn ping(&self) -> Result<String>
pub async fn get_server_time(&self) -> Result<ServerTime>
pub async fn get_exchange_info(&self) -> Result<ExchangeInformation>
Source§impl BaseClient
impl BaseClient
pub async fn get_depth<I, S>(&self, symbol: S, limit: I) -> Result<OrderBook>
pub async fn get_all_prices(&self) -> Result<Prices>
pub async fn get_price<S: Into<MarketPair>>( &self, symbol: S, ) -> Result<SymbolPrice>
pub async fn get_all_book_tickers(&self) -> Result<BookTickers>
pub async fn get_book_ticker(&self, symbol: &str) -> Result<Ticker>
pub async fn get_24h_price_stats(&self, symbol: &str) -> Result<PriceStats>
pub async fn get_klines(&self, params: &KlineParams) -> Result<KlineSummaries>
pub async fn get_24h_price_stats_all(&self) -> Result<Vec<PriceStats>>
Source§impl BaseClient
impl BaseClient
Sourcepub async fn user_stream_start(&self) -> Result<UserDataStream>
pub async fn user_stream_start(&self) -> Result<UserDataStream>
User Stream
Sourcepub async fn user_stream_keep_alive(&self, listen_key: &str) -> Result<Success>
pub async fn user_stream_keep_alive(&self, listen_key: &str) -> Result<Success>
Current open orders on a symbol
pub async fn user_stream_close(&self, listen_key: &str) -> Result<Success>
Trait Implementations§
Source§impl Clone for BaseClient
impl Clone for BaseClient
Source§fn clone(&self) -> BaseClient
fn clone(&self) -> BaseClient
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 BaseClient
impl !UnwindSafe for BaseClient
impl Freeze for BaseClient
impl Send for BaseClient
impl Sync for BaseClient
impl Unpin for BaseClient
impl UnsafeUnpin for BaseClient
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