pub struct Orders { /* private fields */ }Expand description
Orders namespace for order-related operations
Implementations§
Source§impl Orders
impl Orders
Sourcepub fn list(&self) -> Request<ListOrdersResponse>
pub fn list(&self) -> Request<ListOrdersResponse>
List user’s orders
Sourcepub fn get(&self, order_id: impl Into<String>) -> Request<OpenOrder>
pub fn get(&self, order_id: impl Into<String>) -> Request<OpenOrder>
Get a specific order by ID
Sourcepub fn cancel(&self, order_id: impl Into<String>) -> CancelOrderRequest
pub fn cancel(&self, order_id: impl Into<String>) -> CancelOrderRequest
Cancel an order
Sourcepub async fn cancel_all(&self) -> Result<BatchCancelResponse, ClobError>
pub async fn cancel_all(&self) -> Result<BatchCancelResponse, ClobError>
Cancel all open orders
Sourcepub async fn cancel_market(
&self,
market: impl Into<String>,
asset_id: impl Into<String>,
) -> Result<BatchCancelResponse, ClobError>
pub async fn cancel_market( &self, market: impl Into<String>, asset_id: impl Into<String>, ) -> Result<BatchCancelResponse, ClobError>
Cancel all orders for a specific market and asset
Sourcepub fn is_scoring(
&self,
order_id: impl Into<String>,
) -> Request<OrderScoringResponse>
pub fn is_scoring( &self, order_id: impl Into<String>, ) -> Request<OrderScoringResponse>
Check if an order is being scored for rewards
Sourcepub fn are_scoring(
&self,
order_ids: impl Into<Vec<String>>,
) -> Request<Vec<OrderScoringResponse>>
pub fn are_scoring( &self, order_ids: impl Into<Vec<String>>, ) -> Request<Vec<OrderScoringResponse>>
Check if multiple orders are being scored for rewards
Sourcepub async fn cancel_many(
&self,
order_ids: impl Into<Vec<String>>,
) -> Result<BatchCancelResponse, ClobError>
pub async fn cancel_many( &self, order_ids: impl Into<Vec<String>>, ) -> Result<BatchCancelResponse, ClobError>
Cancel multiple orders by ID (up to 3000)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Orders
impl !RefUnwindSafe for Orders
impl Send for Orders
impl Sync for Orders
impl Unpin for Orders
impl UnsafeUnpin for Orders
impl !UnwindSafe for Orders
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> 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