#[non_exhaustive]pub struct AmendSpreadOrderRequest {
pub ord_id: Option<String>,
pub cl_ord_id: Option<String>,
pub req_id: Option<String>,
pub new_sz: Option<String>,
pub new_px: Option<String>,
}Expand description
Amend-spread-order request body (sprd-amend-order).
Either ordId or clOrdId is required; when both are supplied OKX uses
ordId. At least one of newSz or newPx must be supplied.
OKX docs: https://www.okx.com/docs-v5/en/#spread-trading-websocket-trade-api-ws-amend-order
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ord_id: Option<String>OKX order ID.
cl_ord_id: Option<String>Client order ID.
req_id: Option<String>Client amendment request ID.
new_sz: Option<String>New total order quantity.
new_px: Option<String>New order price.
Implementations§
Source§impl AmendSpreadOrderRequest
impl AmendSpreadOrderRequest
Sourcepub fn by_order_id(ord_id: impl Into<String>) -> Self
pub fn by_order_id(ord_id: impl Into<String>) -> Self
Identify the spread order by OKX order ID.
Sourcepub fn by_client_order_id(cl_ord_id: impl Into<String>) -> Self
pub fn by_client_order_id(cl_ord_id: impl Into<String>) -> Self
Identify the spread order by client order ID.
Sourcepub fn request_id(self, req_id: impl Into<String>) -> Self
pub fn request_id(self, req_id: impl Into<String>) -> Self
Set the client amendment request ID.
Trait Implementations§
Source§impl Clone for AmendSpreadOrderRequest
impl Clone for AmendSpreadOrderRequest
Source§fn clone(&self) -> AmendSpreadOrderRequest
fn clone(&self) -> AmendSpreadOrderRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AmendSpreadOrderRequest
impl Debug for AmendSpreadOrderRequest
Source§impl Default for AmendSpreadOrderRequest
impl Default for AmendSpreadOrderRequest
Source§fn default() -> AmendSpreadOrderRequest
fn default() -> AmendSpreadOrderRequest
Returns the “default value” for a type. Read more
impl Eq for AmendSpreadOrderRequest
Source§impl PartialEq for AmendSpreadOrderRequest
impl PartialEq for AmendSpreadOrderRequest
Source§impl Serialize for AmendSpreadOrderRequest
impl Serialize for AmendSpreadOrderRequest
impl StructuralPartialEq for AmendSpreadOrderRequest
Auto Trait Implementations§
impl Freeze for AmendSpreadOrderRequest
impl RefUnwindSafe for AmendSpreadOrderRequest
impl Send for AmendSpreadOrderRequest
impl Sync for AmendSpreadOrderRequest
impl Unpin for AmendSpreadOrderRequest
impl UnsafeUnpin for AmendSpreadOrderRequest
impl UnwindSafe for AmendSpreadOrderRequest
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