I see binance use a custom “fee” mechanism to calculate the fees for every trade operation (buy/sell), i.e. 0.1% without BNB 25% bonus, 0.075 instead, and so on.
Question is: how can I calculate the actual fee via API? Is there any api/field which return the value in percentage? (i.e. 0.1 or 0.075, and so on…).
This is the only endpoint that returns trade fee before placing an order. For special discount, you have to implement the reduction in trading fee yourself to find out.
Question: why for a given symbol/orderid the /myTrade api return an array of trades? Shouldn’t each order have only one trade? Or is in case of momentary partial fill, which sum the total quantity?
@markzzz Orders can be filled by multiple orders due to a difference in size (quantity). Each fill will generate a respective trade, therefore each order will be composed by multiple trades.
@markzzz The commission from tradeFee is an absolute value while the UI displays a percentage value. They both represent is same commission rate 0.1% = 0.001 since 100% = 1.