info = client.get_isolated_margin_account(symbol='BTCUSDT')
totalAssetOfBtc = float(info['totalAssetOfBtc'])
precision = 5
totalBTC = "{:0.0{}f}".format(totalAssetOfBtc, precision)
order = client.create_margin_order(
symbol='BTCUSDT',
side=SIDE_SELL,
type=ORDER_TYPE_MARKET,
sideEffectType="MARGIN_BUY",
quantity=totalBTC
)
Why am I getting BinanceAPIException: APIError(code=-3006): Your borrow amount has exceed maximum borrow amount even if I reduce quantity to very small numbers (2% of my totalAssetOfBtc for example)