pub struct OrderPlaceParams {Show 20 fields
pub symbol: String,
pub side: OrderPlaceSideEnum,
pub type: OrderPlaceTypeEnum,
pub id: Option<String>,
pub time_in_force: Option<OrderPlaceTimeInForceEnum>,
pub price: Option<Decimal>,
pub quantity: Option<Decimal>,
pub quote_order_qty: Option<Decimal>,
pub new_client_order_id: Option<String>,
pub new_order_resp_type: Option<OrderPlaceNewOrderRespTypeEnum>,
pub stop_price: Option<Decimal>,
pub trailing_delta: Option<i32>,
pub iceberg_qty: Option<Decimal>,
pub strategy_id: Option<i64>,
pub strategy_type: Option<i32>,
pub self_trade_prevention_mode: Option<OrderPlaceSelfTradePreventionModeEnum>,
pub peg_price_type: Option<OrderPlacePegPriceTypeEnum>,
pub peg_offset_value: Option<i32>,
pub peg_offset_type: Option<OrderPlacePegOffsetTypeEnum>,
pub recv_window: Option<Decimal>,
}Expand description
Request parameters for the [order_place] operation.
This struct holds all of the inputs you can pass when calling
order_place.
Fields§
§symbol: StringThe symbol parameter.
This field is **required.
side: OrderPlaceSideEnumPlease see Enums for supported values.
This field is **required.
type: OrderPlaceTypeEnumPlease see Enums for supported values.
This field is **required.
id: Option<String>Client-generated request identifier.
This field is **optional.
time_in_force: Option<OrderPlaceTimeInForceEnum>Please see Enums for supported values.
This field is **optional.
price: Option<Decimal>The price parameter.
This field is **optional.
quantity: Option<Decimal>The quantity parameter.
This field is **optional.
quote_order_qty: Option<Decimal>The quote_order_qty parameter.
This field is **optional.
new_client_order_id: Option<String>A unique id among open orders. Automatically generated if not sent.
Orders with the same newClientOrderID can be accepted only when the previous one is filled, otherwise the order will be rejected.
This field is **optional.
new_order_resp_type: Option<OrderPlaceNewOrderRespTypeEnum>MARKET and LIMIT order types default to FULL, all other orders default to ACK.
This field is **optional.
stop_price: Option<Decimal>Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
This field is **optional.
trailing_delta: Option<i32>See Trailing Stop order FAQ
This field is **optional.
iceberg_qty: Option<Decimal>Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
This field is **optional.
strategy_id: Option<i64>The strategy_id parameter.
This field is **optional.
strategy_type: Option<i32>The value cannot be less than 1000000.
This field is **optional.
self_trade_prevention_mode: Option<OrderPlaceSelfTradePreventionModeEnum>The allowed enums is dependent on what is configured on the symbol.
This field is **optional.
peg_price_type: Option<OrderPlacePegPriceTypeEnum>See Pegged Orders Info
This field is **optional.
peg_offset_value: Option<i32>Price level to peg the price to (max: 100). See Pegged Orders Info
This field is **optional.
peg_offset_type: Option<OrderPlacePegOffsetTypeEnum>Only PRICE_LEVEL is supported. See Pegged Orders Info
This field is **optional.
recv_window: Option<Decimal>Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified.
This field is **optional.
Implementations§
Source§impl OrderPlaceParams
impl OrderPlaceParams
Sourcepub fn builder(
symbol: String,
side: OrderPlaceSideEnum,
type: OrderPlaceTypeEnum,
) -> OrderPlaceParamsBuilder
pub fn builder( symbol: String, side: OrderPlaceSideEnum, type: OrderPlaceTypeEnum, ) -> OrderPlaceParamsBuilder
Trait Implementations§
Source§impl Clone for OrderPlaceParams
impl Clone for OrderPlaceParams
Source§fn clone(&self) -> OrderPlaceParams
fn clone(&self) -> OrderPlaceParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more