pub struct CancelOrderRequest {
pub category: Category,
pub symbol: String,
pub order_id: Option<String>,
pub order_link_id: Option<String>,
pub order_filter: Option<OrderFilter>,
}Expand description
Request body of POST /v5/order/cancel (Client::cancel_order).
Fields§
§category: CategoryProduct type. linear, inverse, spot, option
symbol: StringSymbol name, like BTCUSDT, uppercase only
order_id: Option<String>Order ID. Either orderId or orderLinkId is required
order_link_id: Option<String>User customised order ID. Either orderId or orderLinkId is required
order_filter: Option<OrderFilter>Spot trading only Order, tpslOrder, StopOrder If not passed, Order by default
Implementations§
Source§impl CancelOrderRequest
impl CancelOrderRequest
Sourcepub fn new(category: Category, symbol: impl Into<String>) -> Self
pub fn new(category: Category, symbol: impl Into<String>) -> Self
Create with the required fields; set the optional ones with the with_* methods.
Sourcepub fn with_order_id(self, v: impl Into<String>) -> Self
pub fn with_order_id(self, v: impl Into<String>) -> Self
Set order_id: order ID. Either orderId or orderLinkId is required.
Sourcepub fn with_order_link_id(self, v: impl Into<String>) -> Self
pub fn with_order_link_id(self, v: impl Into<String>) -> Self
Set order_link_id: user customised order ID. Either orderId or orderLinkId is required.
Sourcepub fn with_order_filter(self, v: OrderFilter) -> Self
pub fn with_order_filter(self, v: OrderFilter) -> Self
Set order_filter: spot trading only Order, tpslOrder, StopOrder If not passed, Order by default.
Trait Implementations§
Source§impl Clone for CancelOrderRequest
impl Clone for CancelOrderRequest
Source§impl Debug for CancelOrderRequest
impl Debug for CancelOrderRequest
Auto Trait Implementations§
impl Freeze for CancelOrderRequest
impl RefUnwindSafe for CancelOrderRequest
impl Send for CancelOrderRequest
impl Sync for CancelOrderRequest
impl Unpin for CancelOrderRequest
impl UnsafeUnpin for CancelOrderRequest
impl UnwindSafe for CancelOrderRequest
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