Skip to main content

Get Martingale Bot Detail

Retrieve comprehensive details for a specific futures Martingale bot, including configuration, status, PnL metrics, position info, round progress, and timestamps.

info
  • bot_id:
    Obtained from the Create Futures Martingale Bot response or bot listing endpoints.

  • Round progress:
    completed_rounds shows how many full Martingale rounds have been executed. current_round is the active round. current_added_pos_num shows how many position adds have occurred in the current round.

  • Rate limit:
    10 requests per second per UID.

HTTP Request

POST/v5/fmartingalebot/detail

Request Parameters

ParameterRequiredTypeComments
bot_idtruestringBot ID to query

Response Parameters

ParameterTypeComments
status_codeinteger0 = success, non-zero = error
debug_msgstringDebug message (testnet only)
fmart_detailobjectMartingale bot detail object (see below)
> bot_idstringUnique Martingale bot ID
> symbolstringTrading pair (e.g. BTCUSDT)
> base_tokenstringBase coin (e.g. BTC)
> quote_tokenstringQuote coin (e.g. USDT)
> bot_display_statusstringUI display status: Unspecified, Initializing, Awaiting activation, Running, Cancelling, Completed
> fmart_modestringStrategy direction: Unspecified, Long, Short
> leveragestringPosition leverage multiplier (e.g. "5" means 5x)
> actual_leveragestringActual effective leverage (e.g. "4.8" means 4.8x)
> single_round_target_profit_perstringSingle round take-profit target as percentage (e.g. "0.03" means 3%)
> add_pos_numstringUser-configured maximum add position count
> add_pos_perstringPosition add scaling as percentage of base position (e.g. "1" = 1x base)
> price_float_perstringPrice movement trigger as percentage (e.g. "0.015" means 1.5%)
> entry_pricestringEntry trigger price (decimal string). Empty if not set
> sl_perstringStop-loss as percentage (e.g. "0.2" means 20%). Empty if not set
> total_marginstringTotal margin including additional top-ups (decimal string)
> pnlstringCumulative total PnL in quote currency (decimal string)
> pnl_perstringTotal PnL as percentage of total margin (e.g. "0.0505" means 5.05%)
> realized_pnlstringCumulative realized PnL (decimal string)
> unrealized_pnlstringUnrealized PnL based on mark price (decimal string)
> net_funding_feestringCumulative net funding fee (decimal string, positive = received, negative = paid)
> total_aprstringTotal annualized profit rate as percentage (e.g. "0.365" means 36.5% APR)
> completed_roundsintegerNumber of completed Martingale rounds
> current_roundintegerCurrent round number
> current_added_pos_numintegerNumber of position adds in current round
> pos_sizestringCurrent position size in contracts (decimal string)
> avg_pos_pricestringAverage position entry price (decimal string)
> pos_balancestringPosition margin balance (decimal string)
> order_balancestringMargin locked in pending orders (decimal string)
> available_balancestringAvailable (free) margin balance (decimal string)
> mark_pricestringCurrent mark price
> current_pricestringCurrent market price
> estimated_liq_pricestringEstimated liquidation price
> auto_cyclestringAuto-cycle mode: Unspecified, Enabled, Disabled
> stop_typestringStop reason: Unspecified, Init failure, User stopped, Liquidation, Symbol delisted, Stop-loss triggered, System stopped, User banned, Single round take-profit (auto-cycle off), Insufficient order balance, Reduce-only, Bankruptcy price breach, Negative arbitrage, 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, Compliance clearance, ADL (Auto-Deleveraging)
> close_pricestringActual price when bot was stopped
> tick_sizestringMinimum price increment
> 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
> operation_timestringseconds since bot creation
> create_timestringBot creation timestamp (Unix seconds)
> modify_timestringLast update timestamp (Unix seconds)
> end_timestringBot end timestamp (Unix seconds), 0 if still running
> running_durationstringRunning duration in seconds
> adl_rank_indicatorintegerADL (Auto-Deleveraging) rank indicator

Request Example

POST /v5/fmartingalebot/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": "612335724699611830"
}

Response Example

{
"retCode": 0,
"retMsg": "success",
"result": {
"status_code": 0,
"debug_msg": "",
"fmart_detail": {
"bot_id": "612335724699611830",
"symbol": "MNTUSDT",
"bot_display_status": "F_MART_BOT_DISPLAY_STATUS_RUNNING",
"fmart_mode": "F_MART_MODE_MARTINGALE_MODE_LONG",
"base_token": "MNT",
"quote_token": "USDT",
"leverage": "5",
"single_round_target_profit_per": "0.1",
"add_pos_num": "5",
"add_pos_per": "1.8",
"price_float_per": "0.16",
"entry_price": "0.7039",
"sl_per": "0.5",
"total_margin": "1000",
"pnl": "1.41687",
"pnl_per": "0.0014",
"realized_pnl": "-0.02684394",
"unrealized_pnl": "1.44372",
"completed_rounds": 0,
"current_round": 1,
"current_added_pos_num": 1,
"pos_size": "136.2",
"avg_pos_price": "0.7039",
"pos_balance": "19.36433252",
"order_balance": "34.68510157",
"available_balance": "946.66328797",
"mark_price": "0.70966",
"estimated_liq_price": "0",
"actual_leverage": "4.64",
"auto_cycle": "AUTO_CYCLE_TOGGLE_AUTO_CYCLE_TOGGLE_UNKNOWN_UNSPECIFIED",
"operation_time": "56",
"create_time": "1774510133",
"modify_time": "1774510133",
"end_time": "1774510133",
"stop_type": "F_MART_BOT_STOP_TYPE_STOP_TYPE_UNKNOWN_UNSPECIFIED",
"settlement_assets": "",
"tick_size": "0.0001",
"close_price": "0",
"current_price": "0.7145",
"running_duration": "56",
"close_code": "BOT_CLOSE_CODE_FAILED_INITIATION",
"net_funding_fee": "0",
"total_apr": "0.511",
"follow_num": 0,
"used_reward_amount": "",
"used_reward_id": "",
"total_bonus": "0",
"adl_rank_indicator": 2
}
},
"retExtInfo": {},
"time": 1774510189737
}