Create Bot
Create a new futures combo trading bot that manages a portfolio of multiple futures symbols with automatic position rebalancing.
Prerequisites:
Call Get Futures Combo Bot Limit before this endpoint to validate parameter ranges. User must pass KYC/compliance and GEO IP checks.Portfolio configuration:
Thesymbol_settingsarray defines the per-symbol portfolio. Alltarget_position_percentvalues across symbols must sum to 100.Rebalancing mode (
adjust_position_mode):
1: Time-based — rebalance at fixed time intervals
2: Percentage-based — rebalance when allocation drifts by a threshold
3: Time or percentage — whichever triggers first
4: Manual — user-triggered only
5: On settings modification
6: On transferSide (
sideinsymbol_settings):
1: Long,2: ShortResponse
bot_id:
Returned on success. Use for Get Detail and Close.Rate limit:
10 requests per second per UID.Subject to compliance wall, GEO IP check, and KYC verification.
HTTP Request
POST/v5/fcombobot/createRequest Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| leverage | true | string | Position leverage multiplier (e.g. "5" means 5x). Must be >= 1 |
| init_margin | true | string | Initial investment in quote currency (decimal string, e.g. "1000" for 1000 USDT) |
| adjust_position_mode | true | integer | Rebalancing trigger mode: 1 Time, 2 Percentage, 3 Time or Percentage, 4 Manual, 5 On settings change, 6 On transfer |
| symbol_settings | true | array<object> | Per-symbol portfolio configuration. At least one entry required. All target_position_percent must sum to 1 |
| > symbol | true | string | Trading pair symbol (e.g. BTCUSDT) |
| > target_position_percent | true | string | Target portfolio weight as whole-number percentage (e.g. "0.5" means 50%) |
| > side | true | integer | Position direction: 1 Long, 2 Short |
| adjust_position_percent | false | string | Rebalancing drift threshold as percentage, range: [0.01, 0.5] (e.g. "0.05" means rebalance when allocation drifts 5%). Required when mode includes percentage |
| adjust_position_time_interval | false | integer | Rebalancing time interval in seconds. Required when mode includes time. 30M, 1H, 4H, 8H, 12H, 1D, 3D, 7D, 14D, 28D convert to seconds |
| sl_percent | false | string | Stop-loss as percentage of total margin (e.g. "0.2" means close when loss reaches 20%) |
| tp_percent | false | string | Take-profit as percentage of total margin (e.g. "0.5" means close when profit reaches 50%) |
| trailing_stop_percent | false | string | Trailing stop callback as percentage (e.g. "0.05" means 5%) |
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| status_code | integer | 0 = success, 421 = user banned |
| bot_id | integer | Unique bot ID. Use for Get Detail and Close |
| ban_reason_text | string | Localized ban reason. Returned only when status_code=421 |
| debug_msg | string | Debug message (testnet only) |
Request Example
POST /v5/fcombobot/create 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
{
"leverage": "5",
"init_margin": "500",
"adjust_position_mode": 3,
"adjust_position_percent": "0.05",
"adjust_position_time_interval": 3600,
"symbol_settings": [
{
"symbol": "BTCUSDT",
"target_position_percent": "0.5",
"side": 1
},
{
"symbol": "ETHUSDT",
"target_position_percent": "0.5",
"side": 2
}
],
"sl_percent": "0.2",
"tp_percent": "0.5"
}
Response Example
{
"retCode": 0,
"retMsg": "success",
"result": {
"status_code": 0,
"debug_msg": "",
"bot_id": "612323083000239723",
"ban_reason_text": ""
},
"retExtInfo": {},
"time": 1774502598542
}