1019 / MQL5 / USDⓈ-M FUTURES
How can MQL5 query Binance account commission rates?
Call ufUserCommissionRate for the chart symbol and read symbol, makerCommissionRate and takerCommissionRate. These are commission rate fields, not the fee amount charged for an individual fill.
What do you need to use this example?
- Install and configure MT5 Binance and API credentials. Make mt5binance.mqh, JAson.mqh and the account permissions required by this example available.
- Select the trading symbol and configure API access to its account commission rates. For actual fill commission amounts and assets, see example 1014.
How does the source execute?
- On the first tick, call ufUserCommissionRate with symbol=Symbol().
- Convert the UTF-8 response and deserialize the commission-rate object with CJAVal.
- Read makerCommissionRate and takerCommissionRate, then set isRun=true.
Run on the first tick of this attachment; isRun then prevents repetition. Reloading may execute it again.
Parameters and execution behavior
| Parameter | Source value or behavior |
|---|---|
| Main interface | ufUserCommissionRate |
| Symbol | Symbol() |
| Response fields | symbol / makerCommissionRate / takerCommissionRate |
| Result meaning | Rates, not per-fill fee amounts |
| Request timing window | recvWindow = 3000 ms |
| Execution trigger | Run on the first tick of this attachment; isRun then prevents repetition. Reloading may execute it again. |