pub struct OrderCancelReplaceRequest {Show 14 fields
pub orig_cl_ord_id: String,
pub cl_ord_id: String,
pub symbol: String,
pub side: OrderSide,
pub transact_time: DateTime<Utc>,
pub order_qty: Option<f64>,
pub price: Option<f64>,
pub ord_type: Option<OrderType>,
pub time_in_force: Option<TimeInForce>,
pub stop_px: Option<f64>,
pub display_qty: Option<f64>,
pub qty_type: Option<QuantityType>,
pub deribit_label: Option<String>,
pub deribit_mm_protection: Option<bool>,
}Expand description
Order Cancel/Replace Request message (MsgType = ‘G’)
Fields§
§orig_cl_ord_id: StringOriginal client order ID
cl_ord_id: StringNew client order ID
symbol: StringInstrument symbol
side: OrderSideSide of order
transact_time: DateTime<Utc>Transaction time
order_qty: Option<f64>New order quantity
price: Option<f64>New price
ord_type: Option<OrderType>Order type
time_in_force: Option<TimeInForce>Time in force
stop_px: Option<f64>Stop price
display_qty: Option<f64>Display quantity
qty_type: Option<QuantityType>Quantity type
deribit_label: Option<String>Custom label
deribit_mm_protection: Option<bool>Market Maker Protection flag
Implementations§
Source§impl OrderCancelReplaceRequest
impl OrderCancelReplaceRequest
Sourcepub fn new(
orig_cl_ord_id: String,
cl_ord_id: String,
symbol: String,
side: OrderSide,
) -> Self
pub fn new( orig_cl_ord_id: String, cl_ord_id: String, symbol: String, side: OrderSide, ) -> Self
Create a new cancel/replace request
Sourcepub fn with_price(self, price: f64) -> Self
pub fn with_price(self, price: f64) -> Self
Set new price
Sourcepub fn with_order_type(self, ord_type: OrderType) -> Self
pub fn with_order_type(self, ord_type: OrderType) -> Self
Set order type
Sourcepub fn with_time_in_force(self, tif: TimeInForce) -> Self
pub fn with_time_in_force(self, tif: TimeInForce) -> Self
Set time in force
Sourcepub fn with_stop_price(self, stop_px: f64) -> Self
pub fn with_stop_price(self, stop_px: f64) -> Self
Set stop price
Sourcepub fn with_display_qty(self, display_qty: f64) -> Self
pub fn with_display_qty(self, display_qty: f64) -> Self
Set display quantity
Sourcepub fn with_qty_type(self, qty_type: QuantityType) -> Self
pub fn with_qty_type(self, qty_type: QuantityType) -> Self
Set quantity type
Sourcepub fn with_label(self, label: String) -> Self
pub fn with_label(self, label: String) -> Self
Set custom label
Sourcepub fn to_fix_message(
&self,
sender_comp_id: &str,
target_comp_id: &str,
msg_seq_num: u32,
) -> DeribitFixResult<String>
pub fn to_fix_message( &self, sender_comp_id: &str, target_comp_id: &str, msg_seq_num: u32, ) -> DeribitFixResult<String>
Convert to FIX message
Trait Implementations§
Source§impl Clone for OrderCancelReplaceRequest
impl Clone for OrderCancelReplaceRequest
Source§fn clone(&self) -> OrderCancelReplaceRequest
fn clone(&self) -> OrderCancelReplaceRequest
Returns a duplicate of the value. Read more
1.0.0 · 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 OrderCancelReplaceRequest
impl Debug for OrderCancelReplaceRequest
Source§impl<'de> Deserialize<'de> for OrderCancelReplaceRequest
impl<'de> Deserialize<'de> for OrderCancelReplaceRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for OrderCancelReplaceRequest
impl Display for OrderCancelReplaceRequest
impl StructuralPartialEq for OrderCancelReplaceRequest
Auto Trait Implementations§
impl Freeze for OrderCancelReplaceRequest
impl RefUnwindSafe for OrderCancelReplaceRequest
impl Send for OrderCancelReplaceRequest
impl Sync for OrderCancelReplaceRequest
impl Unpin for OrderCancelReplaceRequest
impl UnwindSafe for OrderCancelReplaceRequest
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.