mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 08:48:07 +00:00
* add docs * Add Binance exchange support - Updated the environment configuration to include Binance as a selectable exchange option. - Enhanced the README documentation to reflect the addition of Binance. - Implemented the Binance exchange adapter and integrated it into the existing exchange framework. - Modified the basis arbitrage strategy to support Binance alongside existing exchanges. - Added tests to ensure proper functionality and integration of Binance within the trading system. * Enhance README with detailed Binance exchange configuration - Added comprehensive instructions for setting up Binance as an exchange option. - Included environment variable specifications for API keys, market types, and trading symbols. - Provided examples for both perpetual and spot trading strategies. - Clarified the use of WebSocket and REST for the Binance adapter. * Enhance exchange support and testing framework - Added a new test suite for exchange contracts to ensure consistency and functionality across supported exchanges. - Refactored exchange ID handling to utilize a centralized list of supported exchanges, improving maintainability. - Updated CLI argument parsing and help documentation to reflect the new exchange structure. - Introduced utility functions for validating supported exchanges and their display names. - Enhanced the BasisApp and strategy runner to leverage the new exchange validation logic. - Added a new test command for running exchange-related tests. * Refactor exchange contract tests and update CLI commands - Removed the trailing supported exchanges set and simplified the logic for trailing stop support in the exchange contract tests. - Updated the test command for exchange contracts to exclude unnecessary tests, streamlining the testing process. - Enhanced test descriptions for clarity and improved understanding of the functionality being tested.
138 lines
7.5 KiB
Markdown
138 lines
7.5 KiB
Markdown
---
|
||
title: "Commission FAQ | Binance Open Platform"
|
||
source: "https://developers.binance.com/docs/binance-spot-api-docs/faqs/commission_faq"
|
||
fetched_at: "2026-02-26T10:38:07.334Z"
|
||
---
|
||
# Commission Rates
|
||
|
||
**Disclaimer:**
|
||
|
||
- The commissions and prices used here are fictional, and do not imply anything about the actual setup on the live exchange.
|
||
- This applies only for the SPOT Exchange.
|
||
|
||
### What are Commission Rates?[](https://developers.binance.com/docs/binance-spot-api-docs/faqs/commission_faq)
|
||
|
||
These are the rates that determine the commission to be paid on trades when your order fills for any amount.
|
||
|
||
### What are the different types of rates?[](https://developers.binance.com/docs/binance-spot-api-docs/faqs/commission_faq)
|
||
|
||
There are 3 types:
|
||
|
||
- `standardCommission` - Standard commission rates on trades from the order.
|
||
- `taxCommission` - Tax commission rates on trades from the order.
|
||
- `specialCommission` - Extra commission that will be added in specific circumstances.
|
||
|
||
Standard commission rate may be reduced, depending on promotions for specific trading pairs, applicable discounts, etc.
|
||
|
||
### How do I know what the commission rates are?[](https://developers.binance.com/docs/binance-spot-api-docs/faqs/commission_faq)
|
||
|
||
You can find them using the following requests:
|
||
|
||
REST API: `GET /api/v3/account/commission`
|
||
|
||
WebSocket API: `account.commission`
|
||
|
||
You can also find out the commission rates to a trade from an order using the test order requests with `computeCommissionRates`.
|
||
|
||
### What is the difference between the response sending a test order with `computeCommissionRates` vs the response from querying commission rates?[](https://developers.binance.com/docs/binance-spot-api-docs/faqs/commission_faq)
|
||
|
||
A test order with `computeCommissionRates` returns detailed commission rates for that specific order:
|
||
|
||
```
|
||
{ "standardCommissionForOrder": { "maker": "0.00000050", "taker": "0.00000060" }, "specialCommissionForOrder": { "maker": "0.05000000", "taker": "0.06000000" }, "taxCommissionForOrder": { "maker": "0.00000228", "taker": "0.00000230" }, "discount": { "enabledForAccount": true, "enabledForSymbol": true, "discountAsset": "BNB", "discount": "0.25000000" }}
|
||
```
|
||
|
||
Note: It does not show buyer/seller commissions separately, as these are already taken into account based on the order side.
|
||
|
||
In contrast, querying commission rates returns your current commission rates for the symbol on your account.
|
||
|
||
```
|
||
{ "symbol": "BTCUSDT", "standardCommission": { "maker": "0.00000040", "taker": "0.00000050", "buyer": "0.00000010", "seller": "0.00000010" }, "specialCommission": { "maker": "0.04000000", "taker": "0.05000000", "buyer": "0.01000000", "seller": "0.01000000" }, "taxCommission": { "maker": "0.00000128", "taker": "0.00000130", "buyer": "0.00000100", "seller": "0.00000100" }, "discount": { "enabledForAccount": true, "enabledForSymbol": true, "discountAsset": "BNB", "discount": "0.25000000" }}
|
||
```
|
||
|
||
### How is the commission calculated?[](https://developers.binance.com/docs/binance-spot-api-docs/faqs/commission_faq)
|
||
|
||
Using an example commission configuration:
|
||
|
||
```
|
||
{ "symbol": "BTCUSDT", "standardCommission": { "maker": "0.00000010", "taker": "0.00000020", "buyer": "0.00000030", "seller": "0.00000040" }, "specialCommission": { "maker": "0.01000000", "taker": "0.02000000", "buyer": "0.03000000", "seller": "0.04000000" }, "taxCommission": { "maker": "0.00000112", "taker": "0.00000114", "buyer": "0.00000118", "seller": "0.00000116" }, "discount": { "enabledForAccount": true, "enabledForSymbol": true, "discountAsset": "BNB", "discount": "0.25000000" }}
|
||
```
|
||
|
||
If you placed an order with the following parameters which took immediately and fully filled in a single trade:
|
||
|
||
Parameter
|
||
|
||
Value
|
||
|
||
symbol
|
||
|
||
BTCUSDT
|
||
|
||
price
|
||
|
||
35,000
|
||
|
||
quantity
|
||
|
||
0.49975
|
||
|
||
side
|
||
|
||
SELL
|
||
|
||
type
|
||
|
||
MARKET
|
||
|
||
Since you sold BTC for USDT, the commission will be paid either in USDT or BNB.
|
||
|
||
When standard commission is calculated, the received amount is multiplied with the sum of the rates.
|
||
|
||
Since this order is on the `SELL` side, the received amount is the notional value. (For orders on the `BUY` side, the received amount would be `quantity`.) The order type was `MARKET`, making this the taker order for the trade.
|
||
|
||
```
|
||
Standard Commission = Notional value * (taker + seller) = (35000 * 0.49975) * (0.00000020 + 0.00000040) = 17491.25000000 * 0.00000060 = 0.01049475 USDT
|
||
```
|
||
|
||
Tax commission (if applicable) is calculated similarly:
|
||
|
||
```
|
||
Tax commission = Notional value * (taker + seller) = (35000 * 0.49975) * (0.00000114 + 0.00000116) = 17491.25000000 * 0.00000230 = 0.04022988 USDT
|
||
```
|
||
|
||
Special commission (if applicable) is calculated as:
|
||
|
||
```
|
||
Special commission = Notional value * (taker + seller) = (35000 * 0.49975) * (0.02000000 + 0.04000000) = 17491.25000000 * 0.06000030 = 1049.47500000 USDT
|
||
```
|
||
|
||
If not paying in BNB, the total commission are summed up and deducted from your received amount of `USDT`.
|
||
|
||
Since `enabledforAccount` and `enabledForSymbol` under `discount` is set to `true`, this means the commission will be paid in BNB assuming you have a sufficient balance.
|
||
|
||
If paying with BNB, then the standard commission will be reduced based on the `discount`.
|
||
|
||
First the standard commission and tax commission will be converted into BNB based on the exchange rate. For this example, assume that 1 BNB = 260 USDT.
|
||
|
||
```
|
||
Standard commission (Discounted and in BNB) = (Standard commission * BNB exchange rate) * discount = (0.01049475 * 1/260) * 0.25 = 0.000040364 * 0.25 = 0.000010091
|
||
```
|
||
|
||
Note that the discount **does not apply to tax commissions or special commissions**.
|
||
|
||
```
|
||
Tax Commission (in BNB) = Tax commission * BNB exchange rate = 0.04022988 * (1/260) = 0.00015473Special Commission (in BNB) = Special commission * BNB exchange rate = 1049.47500000 * (1/260) = 4.036442308
|
||
```
|
||
|
||
```
|
||
Total Commission (in BNB) = Standard commission (Discounted) + Tax commission (in BNB) + Special commission (in BNB) = 0.000010091 + 0.00015473 + 4.036442308 = 4.036607129
|
||
```
|
||
|
||
If you do not have enough BNB to pay the discounted commission, the full commission will be taken out of your received amount of USDT instead.
|
||
|
||
- [What are Commission Rates?](https://developers.binance.com/docs/binance-spot-api-docs/faqs/commission_faq)
|
||
- [What are the different types of rates?](https://developers.binance.com/docs/binance-spot-api-docs/faqs/commission_faq)
|
||
- [How do I know what the commission rates are?](https://developers.binance.com/docs/binance-spot-api-docs/faqs/commission_faq)
|
||
- [What is the difference between the response sending a test order with `computeCommissionRates` vs the response from querying commission rates?](https://developers.binance.com/docs/binance-spot-api-docs/faqs/commission_faq)
|
||
- [How is the commission calculated?](https://developers.binance.com/docs/binance-spot-api-docs/faqs/commission_faq)
|