Skip to main content

Get Bot Detail

Retrieve comprehensive details for a specific futures combo bot, including configuration, current status, PnL metrics, portfolio positions, margin balances, and timestamps.

info
  • bot_id:
    Obtained from the Create Futures Combo Bot response.

  • PnL fields:
    total_pnl is the cumulative total. realized_pnl and unrealized_pnl break it down. funding_fee shows net funding fee. total_pnl_per and roi express returns as percentages.

  • Rate limit:
    10 requests per second per UID.

HTTP Request

POST/v5/fcombobot/detail

Request Parameters

ParameterRequiredTypeComments
bot_idtruestringBot ID to query

Response Parameters

ParameterTypeComments
status_codeinteger0 = success, non-zero = error
debug_msgstringDebug message (testnet only)
detailobjectCombo bot detail object (see below)
> bot_idstringUnique combo bot ID
> bot_modestringStrategy direction: Unspecified, Long, Short, Mix
> bot_display_statusstringUI display status: Unspecified, Initializing, Awaiting activation, Running, Cancelling, Completed
> bot_namestringBot display name (comma-separated symbol list)
> leveragestringPosition leverage multiplier (e.g. "5" means 5x)
> total_marginstringTotal margin including additional top-ups (decimal string)
> equitystringRunning equity value in quote currency (decimal string)
> total_pnlstringCumulative total PnL in quote currency (decimal string)
> total_pnl_perstringTotal PnL as percentage of total margin (e.g. "0.0505" means 5.05%)
> roistringReturn on investment as percentage
> total_aprstringTotal annualized profit rate as percentage (e.g. "0.365" means 36.5% APR)
> realized_pnlstringCumulative realized PnL (decimal string)
> unrealized_pnlstringUnrealized PnL based on mark price (decimal string)
> total_exec_feestringCumulative trading execution fees (decimal string)
> funding_feestringCumulative funding fee (decimal string, positive = received, negative = paid)
> total_position_valuestringTotal position value in quote currency (decimal string)
> margin_balancestringMargin balance in quote currency (decimal string)
> available_balancestringAvailable (free) balance in quote currency (decimal string)
> imrstringInitial margin rate as decimal ratio (e.g. "0.1" = 10%)
> mmrstringMaintenance margin rate as decimal ratio (e.g. "0.005" = 0.5%)
> symbol_settingsarray<object>Per-symbol portfolio configuration
>> symbolstringTrading pair symbol (e.g. BTCUSDT)
>> base_tokenstringBase coin (e.g. BTC)
>> quote_tokenstringQuote coin (e.g. USDT)
>> target_position_percentstringTarget portfolio weight as percentage
>> sidestringPosition direction: Long, Short
>> symbol_idintegerInternal symbol ID
> adjust_position_modestringRebalancing trigger mode: Unspecified, Time-based rebalancing, Percentage-based rebalancing, Time or percentage (whichever triggers first), Manual rebalancing by user, Rebalancing on settings modification, Rebalancing on transfer
> adjust_position_percentstringRebalancing drift threshold as percentage
> adjust_position_time_intervalintegerRebalancing time interval in seconds
> adjusted_position_numstringTotal number of position rebalances performed
> last_adjust_position_timestringLast rebalancing timestamp (Unix seconds)
> sl_percentstringStop-loss as percentage (e.g. "0.2" means 20%)
> tp_percentstringTake-profit as percentage (e.g. "0.5" means 50%)
> trailing_stop_percentstringTrailing stop callback as percentage (e.g. "0.05" means 5%)
> stop_typestringStop reason: Unspecified, Init failure, User stopped, Liquidation, Symbol delisted, Stop-loss triggered, System stopped, User banned, Take-profit triggered, Insufficient order balance, Reduce-only, Bankruptcy price breach, Trailing stop, OI limit, Compliance clearance, ADL (Auto-Deleveraging)
> close_codestringUI close code: Unspecified, Failed initiation, Canceled manually by user, Canceled automatically (other), Canceled by take-profit trigger, Canceled by stop-loss trigger, Canceled by liquidation, DCA reached max investment, User account banned, Neutral grid hit top price, Neutral grid hit bottom price, Martingale round take-profit triggered, Symbol delisted, Negative arbitrage, Trailing stop exit, OI limit, Compliance clearance, ADL (Auto-Deleveraging)
> exit_equitystringEquity at exit (decimal string)
> sl_exit_equitystringEquity at stop-loss exit (decimal string)
> tp_exit_equitystringEquity at take-profit exit (decimal string)
> midway_transferstringMidway margin transfer amount (decimal string)
> settlement_assetsstringSettlement asset transfer details
> follow_numintegerNumber of users copying this bot
> used_reward_amountstringTotal voucher/reward amount used
> used_reward_idstringID of the first insurance voucher used
> total_bonusstringTotal bonus amount
> run_time_durationstringRunning duration in seconds
> create_timestringBot creation timestamp (Unix seconds)
> end_timestringBot end timestamp (Unix seconds), 0 if still running
> last_modify_setting_timestringLast settings modification timestamp (Unix seconds)
> ws_tokenstringWebSocket token for real-time updates

Request Example

POST /v5/fcombobot/detail 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": "",
"detail": {
"bot_id": "612324421335537259",
"bot_mode": "BOT_MODE_MIX",
"bot_display_status": "BOT_DISPLAY_STATUS_COMPLETED",
"leverage": "5",
"total_margin": "500",
"total_pnl": "-3.7543",
"total_pnl_per": "-0.0075",
"equity": "496.24",
"roi": "",
"total_apr": "",
"adjusted_position_num": "0",
"last_adjust_position_time": "1774503406",
"create_time": "1774503396",
"end_time": "1774503410",
"close_code": "BOT_CLOSE_CODE_CANCELED_MANUALLY",
"ws_token": "",
"symbol_settings": [
{
"symbol": "BTCUSDT",
"base_token": "BTC",
"quote_token": "USDT",
"target_position_percent": "0.5",
"side": "SIDE_LONG",
"symbol_id": 5
},
{
"symbol": "ETHUSDT",
"base_token": "ETH",
"quote_token": "USDT",
"target_position_percent": "0.5",
"side": "SIDE_SHORT",
"symbol_id": 6
}
],
"sl_percent": "0.2",
"tp_percent": "0.5",
"total_position_value": "0",
"margin_balance": "0",
"available_balance": "0",
"imr": "0",
"mmr": "0",
"funding_fee": "0",
"adjust_position_mode": "ADJUST_POSITION_MODE_TIME_OR_PERCENT",
"adjust_position_percent": "0.05",
"adjust_position_time_interval": 3600,
"bot_name": "BTC ETH",
"run_time_duration": "15",
"settlement_assets": "496.24566099 USDT",
"stop_type": "BOT_STOP_TYPE_BY_USER",
"follow_num": 0,
"used_reward_amount": "",
"used_reward_id": "0",
"total_bonus": "0",
"realized_pnl": "-3.7543",
"unrealized_pnl": "0",
"total_exec_fee": "0.7061",
"last_modify_setting_time": "0",
"midway_transfer": "0",
"exit_equity": "0",
"trailing_stop_percent": "0",
"sl_exit_equity": "0",
"tp_exit_equity": "0"
}
},
"retExtInfo": {},
"time": 1774503836793
}