跳至主要内容

查詢馬丁格爾機器人詳情

查詢指定合約馬丁格爾機器人的完整詳情,包括配置、狀態、盈虧指標、倉位信息、輪次進度及時間戳。

信息
  • bot_id
    創建合約馬丁格爾機器人響應或機器人列表端點中獲取。

  • 輪次進度:
    completed_rounds 顯示已完成的馬丁格爾輪次數。current_round 為當前活躍輪次。current_added_pos_num 顯示當前輪次已追加倉位的次數。

  • 頻率限制:
    每個 UID 每秒最多 10 次請求。

HTTP請求

POST/v5/fmartingalebot/detail

請求參數

參數是否必需類型說明
bot_idtruestring要查詢的機器人 ID

響應參數

參數類型說明
status_codeinteger0 = 成功,非零 = 錯誤
debug_msgstring調試信息(僅測試網)
fmart_detailobject馬丁格爾機器人詳情對象(詳見下方)
> bot_idstring唯一馬丁格爾機器人 ID
> symbolstring交易對名稱(例如 BTCUSDT
> base_tokenstring基礎幣種(例如 BTC
> quote_tokenstring報價幣種(例如 USDT
> bot_display_statusstringUI 顯示狀態:UnspecifiedInitializingAwaiting activationRunningCancellingCompleted
> fmart_modestring策略方向:UnspecifiedLongShort
> leveragestring倉位槓桿倍數(例如 "5" 表示 5 倍)
> actual_leveragestring實際有效槓桿(例如 "4.8" 表示 4.8 倍)
> single_round_target_profit_perstring單輪止盈目標百分比(例如 "0.03" 表示 3%)
> add_pos_numstring用戶設定的最大追加倉位次數
> add_pos_perstring追加倉位規模,以基礎倉位百分比計(例如 "1" = 1 倍基礎倉位)
> price_float_perstring觸發追加倉位的價格變動百分比(例如 "0.015" 表示 1.5%)
> entry_pricestring入場觸發價格(小數字符串)。未設置則為空
> sl_perstring止損百分比(例如 "0.2" 表示 20%)。未設置則為空
> total_marginstring總保證金(含追加投資,小數字符串)
> pnlstring累計總盈虧,以報價幣種計(小數字符串)
> pnl_perstring總盈虧佔總保證金的百分比(例如 "0.0505" 表示 5.05%)
> realized_pnlstring累計已實現盈虧(小數字符串)
> unrealized_pnlstring基於標記價格的未實現盈虧(小數字符串)
> net_funding_feestring累計淨資金費(小數字符串,正值 = 收入,負值 = 支出)
> total_aprstring總年化收益率百分比(例如 "0.365" 表示 36.5% APR)
> completed_roundsinteger已完成的馬丁格爾輪次數
> current_roundinteger當前輪次編號
> current_added_pos_numinteger當前輪次已追加倉位的次數
> pos_sizestring當前持倉合約數量(小數字符串)
> avg_pos_pricestring平均持倉入場價格(小數字符串)
> pos_balancestring倉位保證金餘額(小數字符串)
> order_balancestring掛單鎖定保證金(小數字符串)
> available_balancestring可用(空閒)保證金餘額(小數字符串)
> mark_pricestring當前標記價格
> current_pricestring當前市場價格
> estimated_liq_pricestring預估強平價格
> auto_cyclestring自動循環模式:UnspecifiedEnabledDisabled
> stop_typestring停止原因:UnspecifiedInit failureUser stoppedLiquidationSymbol delistedStop-loss triggeredSystem stoppedUser bannedSingle round take-profit (auto-cycle off)Insufficient order balanceReduce-onlyBankruptcy price breachNegative arbitrageCompliance clearanceADL (Auto-Deleveraging)
> close_codestringUI 關閉代碼:UnspecifiedFailed initiationCanceled manually by userCanceled automatically (other)Canceled by take-profit triggerCanceled by stop-loss triggerCanceled by liquidationDCA reached max investmentUser account bannedNeutral grid hit top priceNeutral grid hit bottom priceMartingale round take-profit triggeredSymbol delistedNegative arbitrageCompliance clearanceADL (Auto-Deleveraging)
> close_pricestring機器人停止時的實際價格
> tick_sizestring最小價格增量
> settlement_assetsstring結算資產轉移詳情
> follow_numinteger跟單此機器人的用戶數量
> used_reward_amountstring已使用的憑證/獎勵總金額
> used_reward_idstring首個使用的保險憑證 ID
> total_bonusstring總獎勵金額
> operation_timestring自機器人創建以來的秒數
> create_timestring機器人創建時間戳(Unix 秒)
> modify_timestring最後更新時間戳(Unix 秒)
> end_timestring機器人結束時間戳(Unix 秒),運行中返回 0
> running_durationstring運行時長(秒)
> adl_rank_indicatorintegerADL(自動減倉)排名指標

請求示例

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"
}

響應示例

{
"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
}