Bot Place Order
Bot-only order placement endpoint. It does not freeze margin or write to the database, and sends orders directly to the matching engine.
đ Requires IP whitelist authorization.
API Informationâ
- Method:
POST - Path:
/fapi/v1/bot/orders
Request Parameters (Body)â
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Trading pair |
| side | integer | Yes | Side: 1=buy, 2=sell |
| position_side | integer | Yes | Position side: 1=long, 2=short (1 in one-way mode) |
| position_action | integer | Yes | Action: 1=open, 2=close |
| type | integer | Yes | Type: 1=limit, 2=market |
| price | string | Conditional | Price (required for limit orders) |
| qty | string | Yes | Contract quantity |
| leverage | integer | No | Leverage (used when opening positions) |
| margin_mode | integer | No | Margin mode: 1=isolated, 2=cross |
| time_in_force | integer | No | Time in force: 1=GTC (default), 2=IOC, 3=FOK, 4=GTX (maker only) |
| reduce_only | boolean | No | Reduce only |
| client_order_id | string | No | Client order ID |
| need_cache | boolean | No | Whether to cache bot orders (default false) |
Request Exampleâ
POST /fapi/v1/bot/orders
{
"symbol": "BTC_USDT",
"side": 1,
"position_side": 1,
"position_action": 1,
"type": 1,
"price": "68500",
"qty": "0.1",
"leverage": 10,
"margin_mode": 1,
"time_in_force": 1,
"client_order_id": "bot-order-001",
"need_cache": true
}
Response Fieldsâ
Response fields are the same as the "Place Order" endpoint.
| 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.status | integer | Order status |
| data.filled_qty | string | Filled quantity |
| data.filled_quote | string | Filled amount |
Response Exampleâ
{
"code": 0,
"message": "success",
"data": {
"order_id": "1234567890123456789",
"client_order_id": "bot-order-001",
"status": 1,
"filled_qty": "0",
"filled_quote": "0"
}
}