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…).
If I use v3/account, it just return to me:
Which is partial info (doesn’t take account BNB discout for example).
Thanks for any helps
This is when an order is already placed.
I need to know the fee “before” to place the order (for both Buy or Sell type)…
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.
I’m not sure why those values doesn’t match from Fee Rate on main website.
Example, there it says I will pay 0.1% of fee (or 0.075 if I own BNB on my Wallet, which I have):
But from that API (i.e. tradeFee), it show to me 0.001 :open_mouth . Example of some:
What Am I missing? 0.001 is waaay lower that 0.1
@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.