Place Order
Info
- This endpoint requires signature. For specific signature rules, please refer to Authentication
- This endpoint will trigger rate limit. For specific rules, please refer to Rate Limit.
Dangerous
- When the server pressure level is too high, placing an order will trigger a 3008 error.
- When a 3008 error is triggered, the order cancellation request still has high priority, that is, the server will give priority to the order cancellation request.
HTTP request
POST /futures/order
Request parameters
Parameter Name | Required | Type | Notes |
---|---|---|---|
market | true | string | Market name |
market_type | true | string | Market type. Note: In spot related functions, only SPOT or MARGIN can be used. In futures related functions, only FUTURES can be used. |
side | true | string | Order side |
type | true | string | Order type |
amount | true | string | Order amount |
price | false | string | Order price |
client_id | false | string | User-defined ID client_id is the custom ID of the order. The server will return the user-defined client_id in the order response, and will also use client_id as an identifier to batch cancel orders. For details, see the related endpoint in Cancel Order via client_id. Currently it only supports uppercase and lowercase letters, numbers, hyphens, and underscores in 32 bytes. |
is_hide | false | bool | Whether to hide the orders. Default as: false Hide this order, it will be hidden in the public depth information, but displayed in your own depth subscription response |
stp_mode | false | string | Self-trading protection mode. ct: Cancel remaining Taker orders immediately cm: Cancel remaining Maker orders immediately (remaining taker orders are not affected if set as limit price orders, remaining untaken taker orders continue to stand with limit price) both: Cancel remaining Taker and Maker orders immediately Note: During the auction period, stop order stp_mode is not effective |
Return parameters
Parameter Name | Type | Notes |
---|---|---|
order_id | int | Order ID |
market | string | Market name |
market_type | string | Market Type |
side | string | Order side |
type | string | Order type |
amount | string | Order amount |
price | string | Order price |
unfilled_amount | string | The remaining unfilled amount |
filled_amount | string | Filled amount |
filled_value | string | Filled value |
client_id | string | Client ID |
fee | string | Trading fee charged |
fee_ccy | string | Trading fee currency |
maker_fee_rate | string | Maker fee rate |
taker_fee_rate | string | Taker fee rate |
last_filled_amount | string | Filled amount of the last transaction |
last_filled_price | string | Filled price of the last transaction |
realized_pnl | string | Realized PNL |
created_at | int | Order creation time |
updated_at | int | Order update time |
Request example
// Place a limit order
{
"market": "CETUSDT",
"market_type": "FUTURES",
"side": "buy",
"type": "limit",
"amount": "10000",
"price": "1",
"client_id": "user1",
"is_hide": true
}
// Place a market order
{
"market": "CETUSDT",
"market_type": "FUTURES",
"side": "buy",
"type": "market",
"amount": "10000",
"client_id": "user1",
"is_hide": true
}
Response example
{
"code": 0,
"data": {
"order_id": "13400",
"market": " CETUSDT",
"market_type": "FUTURES",
"side": "buy",
"type": "limit",
"amount": "10000",
"price": "1",
"unfilled_amount": "50241.7185224371",
"filled_amount": "27564.87468358",
"filled_value": "27564.87468358",
"client_id": "client_id_1",
"fee": "11.6582326221",
"fee_ccy": "USDT",
"maker_fee_rate": "0",
"taker_fee_rate": "0.0003",
"last_filled_amount": "27564.87468358",
"last_filled_price": "1",
"realized_pnl": "-22.142539215",
"created_at": 1691482451000,
"updated_at": 1691482451000
},
"message": "OK"
}