pub struct PreviewOrderParams {Show 15 fields
pub symbol: String,
pub side: CreateSide,
pub order_type: CreateOrderType,
pub quantity: Option<Quantity>,
pub max_quote_debit_scaled: Option<Quantity>,
pub price: Option<Price>,
pub time_in_force: Option<CreateTimeInForce>,
pub client_order_id: Option<String>,
pub subaccount_id: Option<u64>,
pub post_only: Option<bool>,
pub market_client_ref_price: Option<Price>,
pub fee_asset: Option<FeeAsset>,
pub self_trade_prevention: Option<OrderSelfTradePrevention>,
pub market_max_slippage: Option<MaxSlippage>,
pub attached_risk: Option<AttachedRisk>,
}Expand description
Order inputs accepted by crate::services::OrdersService::preview.
Preview uses the same OrderIntent
contract as create. The host performs an admissibility check only: no hold is
placed, and client_order_id is accepted but not claimed.
Fields§
§symbol: String§side: CreateSide§order_type: CreateOrderType§quantity: Option<Quantity>Base quantity. Set exactly one of this and max_quote_debit_scaled.
max_quote_debit_scaled: Option<Quantity>Hard all-in quote debit limit. The Quantity must use
crate::types::QuantityDomain::OrderQuote and carry the pair’s
catalog quote scale. Set exactly one of this and quantity.
price: Option<Price>§time_in_force: Option<CreateTimeInForce>§client_order_id: Option<String>Optional client order id. Accepted for shape parity with create; preview does not claim it.
subaccount_id: Option<u64>§post_only: Option<bool>§market_client_ref_price: Option<Price>§fee_asset: Option<FeeAsset>§self_trade_prevention: Option<OrderSelfTradePrevention>§market_max_slippage: Option<MaxSlippage>§attached_risk: Option<AttachedRisk>Optional TP/SL/trailing controls. Preview validates the full intent; nothing is armed until a subsequent create.
Trait Implementations§
Source§impl Clone for PreviewOrderParams
impl Clone for PreviewOrderParams
Source§fn clone(&self) -> PreviewOrderParams
fn clone(&self) -> PreviewOrderParams
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 moreAuto Trait Implementations§
impl Freeze for PreviewOrderParams
impl RefUnwindSafe for PreviewOrderParams
impl Send for PreviewOrderParams
impl Sync for PreviewOrderParams
impl Unpin for PreviewOrderParams
impl UnsafeUnpin for PreviewOrderParams
impl UnwindSafe for PreviewOrderParams
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