pub struct DeribitOrderParams {Show 13 fields
pub instrument_name: String,
pub amount: Decimal,
pub order_type: String,
pub label: Option<String>,
pub price: Option<Decimal>,
pub time_in_force: Option<String>,
pub post_only: Option<bool>,
pub reject_post_only: Option<bool>,
pub reduce_only: Option<bool>,
pub trigger_price: Option<Decimal>,
pub trigger: Option<String>,
pub max_show: Option<Decimal>,
pub valid_until: Option<u64>,
}Expand description
Order parameters for private/buy and private/sell requests.
Note: Decimal fields are serialized as JSON floats per Deribit API requirements, which may cause precision loss for values with more than ~15 significant digits.
Fields§
§instrument_name: StringInstrument name (e.g., “BTC-PERPETUAL”).
amount: DecimalOrder amount in contracts.
order_type: StringOrder type: “limit”, “market”, “stop_limit”, “stop_market”, “take_limit”, “take_market”.
label: Option<String>User-defined label (client order ID), max 64 chars alphanumeric.
price: Option<Decimal>Limit price (required for limit orders).
time_in_force: Option<String>Time in force: “good_til_cancelled”, “good_til_day”, “fill_or_kill”, “immediate_or_cancel”.
post_only: Option<bool>Post-only flag. If true and order would take liquidity, price is adjusted to be just below the spread (unless reject_post_only is true).
reject_post_only: Option<bool>If true with post_only, order is rejected instead of price being adjusted. Only valid when post_only is true.
reduce_only: Option<bool>Reduce-only flag (only reduces position).
trigger_price: Option<Decimal>Trigger price for stop/take orders.
trigger: Option<String>Trigger type: “last_price”, “index_price”, “mark_price”.
max_show: Option<Decimal>Maximum display quantity for iceberg orders.
valid_until: Option<u64>GTD expiration timestamp in milliseconds.
Trait Implementations§
Source§impl Clone for DeribitOrderParams
impl Clone for DeribitOrderParams
Source§fn clone(&self) -> DeribitOrderParams
fn clone(&self) -> DeribitOrderParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeribitOrderParams
impl Debug for DeribitOrderParams
Auto Trait Implementations§
impl Freeze for DeribitOrderParams
impl RefUnwindSafe for DeribitOrderParams
impl Send for DeribitOrderParams
impl Sync for DeribitOrderParams
impl Unpin for DeribitOrderParams
impl UnsafeUnpin for DeribitOrderParams
impl UnwindSafe for DeribitOrderParams
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more