Skip to main content

Create Bot

Create a new futures combo trading bot that manages a portfolio of multiple futures symbols with automatic position rebalancing.

info
  • 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:
    The symbol_settings array defines the per-symbol portfolio. All target_position_percent values 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 transfer

  • Side (side in symbol_settings):
    1: Long, 2: Short

  • Response 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/create

Request Parameters

ParameterRequiredTypeComments
leveragetruestringPosition leverage multiplier (e.g. "5" means 5x). Must be >= 1
init_margintruestringInitial investment in quote currency (decimal string, e.g. "1000" for 1000 USDT)
adjust_position_modetrueintegerRebalancing trigger mode: 1 Time, 2 Percentage, 3 Time or Percentage, 4 Manual, 5 On settings change, 6 On transfer
symbol_settingstruearray<object>Per-symbol portfolio configuration. At least one entry required. All target_position_percent must sum to 1
> symboltruestringTrading pair symbol (e.g. BTCUSDT)
> target_position_percenttruestringTarget portfolio weight as whole-number percentage (e.g. "0.5" means 50%)
> sidetrueintegerPosition direction: 1 Long, 2 Short
adjust_position_percentfalsestringRebalancing 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_intervalfalseintegerRebalancing time interval in seconds. Required when mode includes time. 30M, 1H, 4H, 8H, 12H, 1D, 3D, 7D, 14D, 28D convert to seconds
sl_percentfalsestringStop-loss as percentage of total margin (e.g. "0.2" means close when loss reaches 20%)
tp_percentfalsestringTake-profit as percentage of total margin (e.g. "0.5" means close when profit reaches 50%)
trailing_stop_percentfalsestringTrailing stop callback as percentage (e.g. "0.05" means 5%)

Response Parameters

ParameterTypeComments
status_codeinteger0 = success, 421 = user banned
bot_idintegerUnique bot ID. Use for Get Detail and Close
ban_reason_textstringLocalized ban reason. Returned only when status_code=421
debug_msgstringDebug 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
}