nofx icon indicating copy to clipboard operation
nofx copied to clipboard

设置保证金模式失败

Open liujiaqiouo opened this issue 1 year ago • 13 comments

执行决策失败 (BTCUSDT open_short): 设置保证金模式失败: code=-4168, msg=Unable to adjust to isolated-margin mode under the Multi-Assets mode. 请问要对帐号做什么设置吗?

liujiaqiouo avatar Oct 30 '25 05:10 liujiaqiouo

开通单资产就行了

onlyfishes avatar Oct 30 '25 05:10 onlyfishes

开通单资产就行了

多资产模式余额显示正常,改成单资产模式,显示的总余额就是0。。。

liujiaqiouo avatar Oct 30 '25 06:10 liujiaqiouo

不会吧 后端日志有没有报错?

onlyfishes avatar Oct 30 '25 06:10 onlyfishes

不会吧 后端日志有没有报错?

没有报错,单资金模式余额是显示的0: { "timestamp": "2025-10-30T14:57:15.254661+08:00", "cycle_number": 1, "input_prompt": "", "cot_trace": "", "decision_json": "", "account_state": { "total_balance": 0, "available_balance": 0, "total_unrealized_profit": -139.17, "position_count": 0, "margin_used_pct": 0 }, "positions": null, "candidate_coins": [ "ADAUSDT", "HYPEUSDT", "BTCUSDT", "ETHUSDT", "SOLUSDT", "BNBUSDT", "XRPUSDT", "DOGEUSDT" ], "decisions": null, "execution_log": [], "success": false,

联合保证金模式下,可以识别余额,但是保证金模式不对: { "timestamp": "2025-10-30T15:00:22.185748+08:00", "cycle_number": 1, "input_prompt": "时间: 2025-10-30 14:59:57 | 周期: #1 | 运行: 0分钟\n\nBTC: 110720.00 (1h: +0.47%, 4h: +0.02%) | MACD: 375.3390 | RSI: 65.48\n\n账户: 净值139.18 | 余额139.18 (100.0%) | 盈亏+0.01% | 保证金0.0% | ... ... "decisions": [ { "action": "open_short", "symbol": "BTCUSDT", "quantity": 0.0062850429523086246, "leverage": 20, "price": 110739.1, "order_id": 0, "timestamp": "2025-10-30T15:00:16.295537+08:00", "success": false, "error": "设置保证金模式失败: \u003cAPIError\u003e code=-4168, msg=Unable to adjust to isolated-margin mode under the Multi-Assets mode." } ], "execution_log": [ "❌ BTCUSDT open_short 失败: 设置保证金模式失败: \u003cAPIError\u003e code=-4168, msg=Unable to adjust to isolated-margin mode under the Multi-Assets mode." ], "success": true, "error_message": ""

liujiaqiouo avatar Oct 30 '25 07:10 liujiaqiouo

你这是余额在币本位吧

onlyfishes avatar Oct 30 '25 07:10 onlyfishes

你这是余额在币本位吧

在U本位合约,保证金余额-USDT

liujiaqiouo avatar Oct 30 '25 07:10 liujiaqiouo

奇怪了 我用的u本位单资产一切正常测试没有问题啊 删除掉程序重新git最新库吧

onlyfishes avatar Oct 30 '25 08:10 onlyfishes

奇怪了 我用的u本位单资产一切正常测试没有问题啊 删除掉程序重新git最新库吧

请问你用的账户模式是“经典交易”模式,不是“统一账户”模式吧

liujiaqiouo avatar Oct 30 '25 08:10 liujiaqiouo

经典交易模式

onlyfishes avatar Oct 30 '25 08:10 onlyfishes

经典交易模式

好的,感谢! 另外,请问您是不是用的国外的服务器呀,我用的国内mac+vpn

liujiaqiouo avatar Oct 31 '25 03:10 liujiaqiouo

嗯嗯我用的是香港的 程序还是放服务器里面跑要稳定的多 本地限制太多了老是出各种问题

onlyfishes avatar Oct 31 '25 03:10 onlyfishes

执行决策失败 (BTCUSDT open_short): 设置保证金模式失败: code=-4168, msg=多资产模式下无法调整为逐仓模式。 请问要对账户做什么设置吗?

你好,我也遇到同样的问题了,你这问题是怎么解决的呀。

samilyang avatar Nov 02 '25 16:11 samilyang

执行决策失败 (BTCUSDT open_short): 设置保证金模式失败: code=-4168, msg=多资产模式下无法调整为逐仓模式。 请问要对账户做什么设置吗?

你好,我也遇到同样的问题了,你这问题是怎么解决的呀。

使用经典交易模式。币安多资产模式不支持逐仓。 本issue将关闭,如果问题存在可以重启issue。

SkywalkerJi avatar Nov 04 '25 03:11 SkywalkerJi