Add Order
POST
/api/v1/orders:::info[Description]
Place order to the futures trading system, you can place two major types of orders: limit and market. Orders can only be placed if your account has sufficient funds. Once an order is placed, your funds will be put on hold for the duration of the order. The amount of funds on hold depends on the order type and parameters specified.
:::
:::tip[Tips]
The maximum limit orders for a single contract is 100 per account, and the maximum stop orders for a single contract is 200 per account.
:::
Request
Unique order id created by users to identify their orders, the maximum length cannot exceed 40, e.g. UUID, Only allows numbers, characters, underline(_), and separator(-)
specify if the order is to 'buy' or 'sell'
Symbol of the contract, Please refer to Get Symbol endpoint: symbol
Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required.
specify if the order is an 'limit' order or 'market' order
remark for the order, length cannot exceed 100 utf8 characters
Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded.
Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified.
Need to be defined if stop is specified.
A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true. If set to true, only the orders reducing the position size will be executed. If the reduce-only order size exceeds the position size, the extra size will be canceled.
A mark to close the position. Set to false by default. If closeOrder is set to true, the system will close the position and the position size will become 0. Side, Size and Leverage fields can be left empty and the system will determine the side and size automatically.
A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default. The system will forcely freeze certain amount of funds for this order, including orders whose direction is opposite to the current positions. This feature is to ensure that the order won’t be canceled by the matching engine in such a circumstance that not enough funds are frozen for the order.
Self Trade Prevention is divided into these strategies: CN, CO, CB. Not supported DC at the moment.
Margin mode: ISOLATED, CROSS, default: ISOLATED
Required for type is 'limit' order, indicating the operating price
Choose one of size, qty, valueQty, Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported.
Choose one of size, qty, valueQty, Order size (Base currency) must be an integer multiple of the multiplier. The unit of the quantity of coin-swap is size(lot), which is not supported
Choose one of size, qty, valueQty, Order size (Value), USDS-Swap correspond to USDT or USDC. The unit of the quantity of coin-swap is size(lot), which is not supported
Optional for type is 'limit' order, Time in force is a special strategy used during trading, default is GTC
Optional for type is 'limit' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed choose hidden or iceberg. The post-only flag ensures that the trader always pays the maker fee and provides liquidity to the order book. If any part of the order is going to pay taker fee, the order will be fully rejected.
Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly.
Optional for type is 'limit' order, Only visible portion of the order is displayed in the order book. When iceberg chose, not allowed choose postOnly.
Optional for type is 'limit' order, The maximum visible size of an iceberg order. please place order in size (lots), The units of qty (base currency) and valueQty (value) are not supported.
{
"clientOid": "5c52e11203aa677f33e493fb",
"side": "buy",
"symbol": "XBTUSDTM",
"leverage": 3,
"type": "limit",
"remark": "order remarks",
"reduceOnly": false,
"marginMode": "ISOLATED",
"price": "0.1",
"size": 1,
"timeInForce": "GTC"
}
Request samples
Responses
The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.
The user self-defined order id.
{
"code": "200000",
"data": {
"orderId": "234125150956625920",
"clientOid": "5c52e11203aa677f33e493fb"
}
}