Open A-leonidas opened 2 years ago
Just thought I'd be helpful and post the following:
Currently there is no functionality in this module to disable margin accounts which you need to do in order to trade other margin pairs once you have met your isolated margin account limit (see Binance website for more info on the limit). I have changed the module in a personal copy to include the following:
def disable_isolated_margin_account(self, **params): return self._request_margin_api('delete', 'margin/isolated/account', signed=True, data=params) async def disable_isolated_margin_account(self, **params): return await self._request_margin_api('delete', 'margin/isolated/account', signed=True, data=params)
The above changes now allow functionality to disable accounts via this API. Just thought I'd flag in case owner wanted to implement a similar update.
Thanks ))
Or if you don't want to change a source code of this lib You just can to use this variant
def disable_isolated_margin_account(symbol=''):
return client._request_margin_api('delete', 'margin/isolated/account', signed=True, data={'symbol': symbol})
disable_isolated_margin_account(symbol='LUNAUSDT')
Just thought I'd be helpful and post the following:
Currently there is no functionality in this module to disable margin accounts which you need to do in order to trade other margin pairs once you have met your isolated margin account limit (see Binance website for more info on the limit). I have changed the module in a personal copy to include the following:
The above changes now allow functionality to disable accounts via this API. Just thought I'd flag in case owner wanted to implement a similar update.