pub struct OrderApi { /* private fields */ }
Implementations§
Source§impl OrderApi
impl OrderApi
pub fn new(client: SignerClient) -> Self
pub async fn create_order( &self, symbol: &str, side: Side, order_type: OrderType, quantity: &str, price: Option<&str>, client_order_id: Option<&str>, time_in_force: Option<TimeInForce>, post_only: Option<bool>, reduce_only: Option<bool>, ) -> Result<Order>
pub async fn cancel_order( &self, order_id: Option<&str>, client_order_id: Option<&str>, symbol: Option<&str>, ) -> Result<()>
pub async fn cancel_all_orders(&self, symbol: Option<&str>) -> Result<u32>
pub async fn get_order(&self, order_id: &str) -> Result<Order>
pub async fn get_orders( &self, filter: Option<OrderFilter>, ) -> Result<(Vec<Order>, Option<Pagination>)>
pub async fn get_trades(&self, symbol: Option<&str>) -> Result<Vec<Trade>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OrderApi
impl !RefUnwindSafe for OrderApi
impl Send for OrderApi
impl Sync for OrderApi
impl Unpin for OrderApi
impl !UnwindSafe for OrderApi
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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