Place Order
Create a new perpetual futures order.
API Information
- Method:
POST - Path:
/fapi/v1/orders - Authentication: Requires signature authentication (see Common Module · Signature Specification)
Request Parameters (Body)
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Trading pair, e.g. BTC_USDT |
| type | integer | Yes | Type: 1=limit, 2=market |
| qty | string | Yes | Quantity |
| position_action | integer | Yes | Position action: 1=open, 2=close |
| position_side | integer | Yes | Position side: 1=long, 2=short |
| price | string | No | Price (required for limit orders) |
| client_order_id | string | No | Client order ID (idempotent) |
| leverage | integer | No | Leverage (optional, otherwise uses configured leverage) |
| margin_mode | integer | No | Margin mode: 1=isolated, 2=cross |
| time_in_force | integer | No | Time in force: 1=GTC, 2=IOC, 3=FOK, 4=GTX |
| post_only | boolean | No | Whether maker-only |
| reduce_only | boolean | No | Whether reduce-only |
| close_position | boolean | No | Whether to close the entire position |
| resp_type | integer | No | Response type: 1=ACK, 2=RESULT, 3=FULL (default 1) |
| need_cache | boolean | No | Whether bot orders need caching (default false) |
Request Example
{
"symbol": "BTC_USDT",
"type": 1,
"qty": "0.1",
"position_action": 1,
"position_side": 1,
"price": "68500.00",
"client_order_id": "my-order-001",
"leverage": 10,
"margin_mode": 1,
"time_in_force": 1,
"resp_type": 1
}
Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | Status code |
| message | string | Response message |
| data.order_id | string | Order ID |
| data.client_order_id | string | Client order ID |
| data.symbol | string | Trading pair |
| data.status | integer | Order status (returned by RESULT/FULL) |
| data.filled_qty | string | Filled quantity (returned by RESULT/FULL) |
| data.filled_quote | string | Filled amount (returned by RESULT/FULL) |
| data.trades | array | Trade details (returned by FULL) |
| data.created_at | integer | Creation time (milliseconds) |
Response Example
{
"code": 0,
"message": "success",
"data": {
"order_id": "1234567890123456789",
"client_order_id": "my-order-001",
"symbol": "BTC_USDT",
"status": 1,
"filled_qty": "0",
"filled_quote": "0",
"trades": [
{
"maker_order_id": "1234567890123",
"match_id": "9876543210",
"price": "68500",
"qty": "0.05",
"quote_qty": "3425",
"trade_index": 0
}
],
"created_at": 1711929600000
}
}