Close Bot
Close a running futures combo trading bot. The bot will cancel all pending orders and close all positions across the portfolio.
info
Bot state requirement:
Only bots in a running state can be closed. Thebot_idcan be obtained from the Create Futures Combo Bot response or from Get Futures Combo Bot Detail.After closing:
Use Get Futures Combo Bot Detail to check the final PnL and close reason.Rate limit:
10 requests per second per UID.
HTTP Request
POST/v5/fcombobot/closeRequest Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| bot_id | true | string | Bot ID to close, obtained from Create Futures Combo Bot response |
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| status_code | integer | 0 = success, non-zero = error |
| debug_msg | string | Debug message (testnet only) |
Request Example
POST /v5/fcombobot/close HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1672211928338
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
{
"bot_id": "612324421335537259"
}
Response Example
{
"retCode": 0,
"retMsg": "success",
"result": {
"status_code": 0,
"debug_msg": ""
},
"retExtInfo": {},
"time": 1774503410522
}