Create Order
Create a futures opening or closing order, supporting market and limit orders.
API Information
- Method:
POST - Path:
/api/v1/futures/open-api/order/create
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Futures trading pair, e.g. BTCUSDT |
| coType | int | Yes | Contract type: 1=US stocks, 2=Hong Kong stocks, 3=Cryptocurrency |
| orderType | int | Yes | Order type: 1=Limit, 2=Market |
| openType | int | Yes | Open/Close: 1=Open, 2=Close |
| side | int | Yes | Direction: 1=Long (Buy), 2=Short (Sell) |
| price | string | Conditional | Order price (required for limit orders) |
| vol | string | Conditional | Quantity (choose vol or amt) |
| amt | string | Conditional | Amount in USD (choose vol or amt, recommended for opening) |
| leverage | string | Required for open | Leverage, e.g. "10" |
| marginMode | int | No | Margin mode: 1=Cross, 2=Isolated, default 1 |
| posId | int64 | Required for close | Position ID |
| stopProfitPrice | string | No | Take profit price |
| stopLossPrice | string | No | Stop loss price |
| triggerType | int | No | Trigger type: 1=Normal, 2=Take profit, 3=Stop loss, 4=Liquidation |
Request Example
Opening Example:
{
"symbol": "BTCUSDT",
"coType": 3,
"orderType": 2,
"openType": 1,
"side": 1,
"amt": "10000",
"leverage": "10",
"marginMode": 1,
"triggerType": 1
}
Closing Example:
{
"symbol": "BTCUSDT",
"coType": 3,
"orderType": 2,
"openType": 2,
"side": 1,
"posId": 123456,
"vol": "0.5",
"triggerType": 1
}