Skip to main content

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)​

ParameterTypeRequiredDescription
symbolstringYesTrading pair
sideintegerYesSide: 1=buy, 2=sell
position_sideintegerYesPosition side: 1=long, 2=short (1 in one-way mode)
position_actionintegerYesAction: 1=open, 2=close
typeintegerYesType: 1=limit, 2=market
pricestringConditionalPrice (required for limit orders)
qtystringYesContract quantity
leverageintegerNoLeverage (used when opening positions)
margin_modeintegerNoMargin mode: 1=isolated, 2=cross
time_in_forceintegerNoTime in force: 1=GTC (default), 2=IOC, 3=FOK, 4=GTX (maker only)
reduce_onlybooleanNoReduce only
client_order_idstringNoClient order ID
need_cachebooleanNoWhether 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.

FieldTypeDescription
codeintegerStatus code
messagestringResponse message
data.order_idstringOrder ID
data.client_order_idstringClient order ID
data.statusintegerOrder status
data.filled_qtystringFilled quantity
data.filled_quotestringFilled 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"
}
}