pub struct DexClient { /* private fields */ }
Implementations§
Source§impl DexClient
impl DexClient
pub async fn new(api_key: String, base_url: String) -> Result<Self, Error>
pub async fn get_ticker( &self, dex: &str, symbol: &str, ) -> Result<TickerResponse, DexError>
pub async fn get_filled_orders( &self, dex: &str, symbol: &str, ) -> Result<FilledOrdersResponse, DexError>
pub async fn get_balance(&self, dex: &str) -> Result<BalanceResponse, DexError>
pub async fn clear_filled_order( &self, dex: &str, symbol: &str, order_id: &str, ) -> Result<DefaultResponse, DexError>
pub async fn create_order( &self, dex: &str, symbol: &str, size: &str, side: &str, price: Option<String>, ) -> Result<CreateOrderResponse, DexError>
pub async fn cancel_order( &self, dex: &str, order_id: &str, ) -> Result<DefaultResponse, DexError>
pub async fn close_all_positions( &self, dex: &str, symbol: Option<String>, ) -> Result<DefaultResponse, DexError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DexClient
impl !RefUnwindSafe for DexClient
impl Send for DexClient
impl Sync for DexClient
impl Unpin for DexClient
impl !UnwindSafe for DexClient
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