pub struct PlaceOrderRequest {Show 33 fields
pub category: Category,
pub symbol: String,
pub is_leverage: Option<i64>,
pub side: Side,
pub order_type: OrderType,
pub qty: Decimal,
pub market_unit: Option<String>,
pub slippage_tolerance_type: Option<Decimal>,
pub slippage_tolerance: Option<Decimal>,
pub price: Option<Decimal>,
pub trigger_direction: Option<TriggerDirection>,
pub order_filter: Option<String>,
pub trigger_price: Option<Decimal>,
pub trigger_by: Option<TriggerBy>,
pub order_iv: Option<Decimal>,
pub time_in_force: Option<TimeInForce>,
pub position_idx: Option<PositionIdx>,
pub order_link_id: Option<String>,
pub take_profit: Option<Decimal>,
pub stop_loss: Option<Decimal>,
pub tp_trigger_by: Option<TriggerBy>,
pub sl_trigger_by: Option<TriggerBy>,
pub reduce_only: Option<bool>,
pub close_on_trigger: Option<bool>,
pub smp_type: Option<SmpType>,
pub mmp: Option<bool>,
pub tpsl_mode: Option<TpslMode>,
pub tp_limit_price: Option<Decimal>,
pub sl_limit_price: Option<Decimal>,
pub tp_order_type: Option<OrderType>,
pub sl_order_type: Option<OrderType>,
pub bbo_side_type: Option<String>,
pub bbo_level: Option<String>,
}Fields§
§category: CategoryProduct type UTA2.0, UTA1.0: linear, inverse, spot, option classic account: linear, inverse, spot
symbol: StringSymbol name, like BTCUSDT, uppercase only
is_leverage: Option<i64>0(default): false, spot trading 1: true, margin trading, make sure you turn on margin trading, and set the relevant currency as collateral
side: SideBuy, Sell
order_type: OrderTypeMarket, Limit
qty: DecimalOrder quantity UTA account Spot: Market Buy order by value by default, you can set marketUnit field to choose order by value or qty for market orders Perps, Futures & Option: always order by qty classic account Spot: Market Buy order by value by default Perps, Futures: always order by qty Perps & Futures: if you pass qty=“0” and specify reduceOnly=true&closeOnTrigger=true, you can close the position up to maxMktOrderQty or maxOrderQty shown on Get Instruments Info of current symbol
market_unit: Option<String>Select the unit for qty when create Spot market orders for UTA account baseCoin: for example, buy BTCUSDT, then “qty” unit is BTC quoteCoin: for example, sell BTCUSDT, then “qty” unit is USDT
slippage_tolerance_type: Option<Decimal>Slippage tolerance Type for market order, TickSize, Percent take profit, stoploss, conditional orders are not supported TickSize: the highest price of Buy order = ask1 + slippageTolerance x tickSize; the lowest price of Sell order = bid1 - slippageTolerance x tickSize Percent: the highest price of Buy order = ask1 x (1 + slippageTolerance x 0.01); the lowest price of Sell order = bid1 x (1 - slippageTolerance x 0.01)
slippage_tolerance: Option<Decimal>Slippage tolerance value TickSize: range is [1, 10000], integer only Percent: range is [0.01, 10], up to 2 decimals
price: Option<Decimal>Order price Market order will ignore this field Please check the min price and price precision from instrument info endpoint If you have position, price needs to be better than liquidation price
trigger_direction: Option<TriggerDirection>Conditional order param. Used to identify the expected direction of the conditional order. 1: triggered when market price rises to triggerPrice 2: triggered when market price falls to triggerPrice Valid for linear & inverse
order_filter: Option<String>If it is not passed, Order by default. Order tpslOrder: Spot TP/SL order, the assets are occupied even before the order is triggered StopOrder: Spot conditional order, the assets will not be occupied until the price of the underlying asset reaches the trigger price, and the required assets will be occupied after the Conditional order is triggered Valid for spot only
trigger_price: Option<Decimal>For Perps & Futures, it is the conditional order trigger price. If you expect the price to rise to trigger your conditional order, make sure: triggerPrice > market price Else, triggerPrice < market price For spot, it is the TP/SL and Conditional order trigger price
trigger_by: Option<TriggerBy>Trigger price type, Conditional order param for Perps & Futures. LastPrice IndexPrice MarkPrice Valid for linear & inverse
order_iv: Option<Decimal>Implied volatility. option only. Pass the real value, e.g for 10%, 0.1 should be passed. orderIv has a higher priority when price is passed as well
time_in_force: Option<TimeInForce>Time in force Market order will always use IOC If not passed, GTC is used by default
position_idx: Option<PositionIdx>Used to identify positions in different position modes. Under hedge-mode, this param is required 0: one-way mode 1: hedge-mode Buy side 2: hedge-mode Sell side
order_link_id: Option<String>User customised order ID. A max of 36 characters. Combinations of numbers, letters (upper and lower cases), dashes, and underscores are supported. Futures & Perps: orderLinkId rules: optional param always unique option orderLinkId rules: required param always unique
take_profit: Option<Decimal>Take profit price UTA: Spot Limit order supports take profit, stop loss or limit take profit, limit stop loss when creating an order
stop_loss: Option<Decimal>Stop loss price UTA: Spot Limit order supports take profit, stop loss or limit take profit, limit stop loss when creating an order
tp_trigger_by: Option<TriggerBy>The price type to trigger take profit. MarkPrice, IndexPrice, default: LastPrice. Valid for linear & inverse
sl_trigger_by: Option<TriggerBy>The price type to trigger stop loss. MarkPrice, IndexPrice, default: LastPrice. Valid for linear & inverse
reduce_only: Option<bool>What is a reduce-only order? true means your position can only reduce in size if this order is triggered. You must specify it as true when you are about to close/reduce the position When reduceOnly is true, take profit/stop loss cannot be set Valid for linear, inverse & option
close_on_trigger: Option<bool>What is a close on trigger order? For a closing order. It can only reduce your position, not increase it. If the account has insufficient available balance when the closing order is triggered, then other active orders of similar contracts will be cancelled or reduced. It can be used to ensure your stop loss reduces your position regardless of current available margin. Valid for linear & inverse
smp_type: Option<SmpType>Smp execution type. What is SMP?
mmp: Option<bool>Market maker protection. option only. true means set the order as a market maker protection order. What is mmp?
tpsl_mode: Option<TpslMode>TP/SL mode Full: entire position for TP/SL. Then, tpOrderType or slOrderType must be Market Partial: partial position tp/sl (as there is no size option, so it will create tp/sl orders with the qty you actually fill). Limit TP/SL order are supported. Note: When create limit tp/sl, tpslMode is required and it must be Partial Valid for linear & inverse
tp_limit_price: Option<Decimal>The limit order price when take profit price is triggered linear & inverse: only works when tpslMode=Partial and tpOrderType=Limit Spot(UTA): it is required when the order has takeProfit and “tpOrderType”=Limit
sl_limit_price: Option<Decimal>The limit order price when stop loss price is triggered linear & inverse: only works when tpslMode=Partial and slOrderType=Limit Spot(UTA): it is required when the order has stopLoss and “slOrderType”=Limit
tp_order_type: Option<OrderType>The order type when take profit is triggered linear & inverse: Market(default), Limit. For tpslMode=Full, it only supports tpOrderType=Market Spot(UTA): Market: when you set “takeProfit”, Limit: when you set “takeProfit” and “tpLimitPrice”
sl_order_type: Option<OrderType>The order type when stop loss is triggered linear & inverse: Market(default), Limit. For tpslMode=Full, it only supports slOrderType=Market Spot(UTA): Market: when you set “stopLoss”, Limit: when you set “stopLoss” and “slLimitPrice”
bbo_side_type: Option<String>Queue: use the order price on the orderbook in the same direction as the side Counterparty: use the order price on the orderbook in the opposite direction as the side Valid for linear & inverse
bbo_level: Option<String>1,2,3,4,5 Valid for linear & inverse