Struct dex_client::DexClient
source · 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_balance(&self, dex: &str) -> Result<BalanceResponse, DexError>
pub async fn create_order( &self, dex: &str, symbol: &str, size: &str, side: &str, price: Option<String> ) -> Result<CreateOrderResponse, DexError>
pub async fn close_all_positions( &self, dex: &str, symbol: Option<String> ) -> Result<CloseAllPositionsResponse, DexError>
Trait Implementations§
Auto Trait Implementations§
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