Closed SaeedRz96 closed 9 months ago
Could you share the output of print(session.get_account_info())
Could you share the output of
print(session.get_account_info())
Here is the output:
{'retCode': 0, 'retMsg': 'OK', 'result': {'marginMode': 'REGULAR_MARGIN', 'updatedTime': '1701804436000', 'unifiedMarginStatus': 3, 'dcpStatus': 'OFF', 'timeWindow': 10, 'smpGroup': 0, 'isMasterTrader': False, 'spotHedgingStatus': 'OFF'}}
The unified trading account ('unifiedMarginStatus': 3
) doesn't support category linear. See which account covers what in the documentation https://bybit-exchange.github.io/docs/v5/position/cross-isolate
You should use this endpoint instead set_margin_mode()
https://bybit-exchange.github.io/docs/v5/account/set-margin-mode
I'm using the latest release(5.6.2) and all methods work correctly except
switch_margin_mode
. This is my code sample:And i got this error: