pub struct AmendOrderRequest {
pub category: Category,
pub symbol: String,
pub order_id: Option<String>,
pub order_link_id: Option<String>,
pub qty: Option<Decimal>,
pub price: Option<Decimal>,
}Expand description
Request body of POST /v5/order/amend (Client::amend_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.
qty: Option<Decimal>Order quantity after modification. Do not pass it if not modify the qty.
price: Option<Decimal>Order price after modification. Do not pass it if not modify the price.
Implementations§
Source§impl AmendOrderRequest
impl AmendOrderRequest
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_qty(self, v: Decimal) -> Self
pub fn with_qty(self, v: Decimal) -> Self
Set qty: order quantity after modification. Do not pass it if not modify the qty.
Sourcepub fn with_price(self, v: Decimal) -> Self
pub fn with_price(self, v: Decimal) -> Self
Set price: order price after modification. Do not pass it if not modify the price.