pub struct OrderRequest {Show 21 fields
pub order_id: Option<String>,
pub instrument_name: String,
pub amount: Option<f64>,
pub contracts: Option<f64>,
pub type_: Option<OrderType>,
pub label: Option<String>,
pub price: Option<f64>,
pub time_in_force: Option<TimeInForce>,
pub display_amount: Option<f64>,
pub post_only: Option<bool>,
pub reject_post_only: Option<bool>,
pub reduce_only: Option<bool>,
pub trigger_price: Option<f64>,
pub trigger_offset: Option<f64>,
pub trigger: Option<Trigger>,
pub advanced: Option<AdvancedOrderType>,
pub mmp: Option<bool>,
pub valid_until: Option<i64>,
pub linked_order_type: Option<LinkedOrderType>,
pub trigger_fill_condition: Option<TriggerFillCondition>,
pub otoco_config: Option<Vec<String>>,
}Expand description
Order request structure for placing orders on Deribit
Fields§
§order_id: Option<String>Unique order identifier
instrument_name: StringName of the instrument to trade
amount: Option<f64>Order amount (for futures and perpetuals)
contracts: Option<f64>Number of contracts (for options)
type_: Option<OrderType>Order type (market, limit, etc.)
label: Option<String>User-defined label for the order
price: Option<f64>Limit price for the order
time_in_force: Option<TimeInForce>Time in force specification
display_amount: Option<f64>Amount to display in the order book
post_only: Option<bool>Whether the order should only be posted (not taken)
reject_post_only: Option<bool>Whether to reject if the order would be posted only
reduce_only: Option<bool>Whether this order only reduces position
trigger_price: Option<f64>Trigger price for conditional orders
trigger_offset: Option<f64>Trigger offset for conditional orders
trigger: Option<Trigger>Trigger type for conditional orders
advanced: Option<AdvancedOrderType>Advanced order type (USD or implied volatility)
mmp: Option<bool>Market maker protection flag
valid_until: Option<i64>Order validity timestamp (Unix timestamp)
linked_order_type: Option<LinkedOrderType>Type of linked order (OTO, OCO, OTOCO)
trigger_fill_condition: Option<TriggerFillCondition>Trigger fill condition for linked orders
otoco_config: Option<Vec<String>>Configuration for OTOCO (One-Triggers-One-Cancels-Other) orders
Trait Implementations§
Source§impl Clone for OrderRequest
impl Clone for OrderRequest
Source§fn clone(&self) -> OrderRequest
fn clone(&self) -> OrderRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OrderRequest
impl Debug for OrderRequest
Source§impl<'de> Deserialize<'de> for OrderRequest
impl<'de> Deserialize<'de> for OrderRequest
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>,
Source§impl Display for OrderRequest
impl Display for OrderRequest
Auto Trait Implementations§
impl Freeze for OrderRequest
impl RefUnwindSafe for OrderRequest
impl Send for OrderRequest
impl Sync for OrderRequest
impl Unpin for OrderRequest
impl UnwindSafe for OrderRequest
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
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.