This is NOT a question about the endpoint GET /sapi/v1/margin/maxBorrowable to get max borrow amount, as someone has suggested as an answer and closed my topic. maxBorrowable is pretty straightforward, but is not related to my question. Question is about something else. Please, read carefully (Dino).
Trying to figure out how does Binance calculate the Margin Borrow Amount.
Following is a real example:
(True,
{‘clientOrderId’: ‘xxxxxxx’,
‘cummulativeQuoteQty’: ‘87.8704292’,
‘executedQty’: ‘0.00164’,
‘fills’: [{‘commission’: ‘0.08787043’,
‘commissionAsset’: ‘USDT’,
‘price’: ‘53579.53’,
‘qty’: ‘0.00164’}],
‘isIsolated’: False,
‘marginBuyBorrowAmount’: ‘0.00163204’,
‘marginBuyBorrowAsset’: ‘BTC’,
‘orderId’: xxxxxxx,
‘origQty’: ‘0.00164’,
‘price’: ‘0’,
‘side’: ‘SELL’,
‘status’: ‘FILLED’,
‘symbol’: ‘BTCUSDT’,
‘timeInForce’: ‘GTC’,
‘transactTime’: 1633623180921,
‘type’: ‘MARKET’})
How does Binance calculate the marginBuyBorrowAmount?
Within above example marginBuyBorrowAmount = 0.00163204, while the executedQty is 0.00164. How was this figure of 0.00163204 calculated?
Please, note that before the order was executed, I had some 0.00003377 BTC leftovers in the BTC account.
Anyone can give a clear idea?
Much appreciated…