CommissionProfile

CommissionProfile contains settings that define commission for executed orders. All such settings are defined in CommissionProfileSetting. CommissionProfile contains the following parameters and can be accessed through either pending config or real-time config
| attributes | required | default settings | attribute type | description |
|---|---|---|---|---|
| id | Y | – | INT | The ID of the profile; generated. |
| name | Y | – | STRING | The name of the profile |
| description | N | n/a | STRING | Free text |
Commission is processed when an order closes with nonzero total filled quantity, including an order that is partially filled and then canceled. It uses aggregate fills and does not wait for position closure or P&L settlement. A positive result credits the selected wallet; a negative result debits it. No automatic opposite-side booking is created.
CommissionProfileSetting

CommissionProfileSetting contains the following parameters and can be accessed through either pending config or real-time config
| attributes | required | default settings | attribute type | description |
|---|---|---|---|---|
| id | Y | – | INT | Uniquely identifies each commission profile setting by a numerical value. |
| profile | Y | – | INT | The profile to which the current settings will apply. |
| by | Y | – | VARCHAR | Specified as security ‘sec’ or symbol ‘sym’. |
| key | Y | – | VARCHAR | If ‘by’ is set to ‘sym’, the ‘key’ has to be a Symbol and cannot be set to ‘*’. If ‘by’ is set to ‘sec’, the ‘key’ has to be either the security name or ‘*’, which acts as a wildcard. Note : More specific rules have priority over less specific. For example a setting for a ‘sym’ has priority over ‘sec’ with a defined security and which itself has priority over a ‘sec’ with ‘*’ specified. |
| type | Y | – | VARCHAR | Commission calculation type: POINTS, CASH, CASH_NOTIONAL or CASH_FIXED. |
| ccy | Y | – | VARCHAR | The currency of the calculated commission amount. A configured currency is required for every calculation type. Required conversion rates must be available when processing the commission; a missing rate can prevent or zero the amount. Do not assume it will be collected automatically later. |
| value | Y | 0 | DOUBLE | The signed rate used in the calculations defined by the type parameter. A positive result credits the wallet and a negative result debits it; 0 produces no commission. |
| comment | N | – | VARCHAR | Optional comment section. Both comment and comment_2 support the keywords below, which will be replaced with their corresponding data: 1. #SYM#: The order.symbol 2. #BASE#: The base currency of the order.symbol 3. #QUOTE#: The quote currency of the order.symbol 4. #TYPE#: The type of the commission charge 5. #ORDER#: The order.id |
| comment_2 | N | – | VARCHAR | Optional comment section which supports the same keywords as comment. |
Commission calculation
The formulas below give the commission amount in the configured ccy:
- fillSize: total filled internal quantity of the order.
- fillPrice: weighted adjusted taker fill price.
- value: configured commission rate.
- baseCcy and quoteCcy: the symbol’s base and quote currencies.
- conv(source, target): conversion rate from the source currency to the target currency.
| Type | Security type FX |
Other security types |
|---|---|---|
POINTS |
fillSize × value × conv(quoteCcy, ccy) |
fillSize × value × conv(quoteCcy, ccy) |
CASH |
fillSize × value / 1,000,000 |
fillSize × fillPrice × value / 1,000,000 |
CASH_NOTIONAL |
fillSize × value × conv(baseCcy, ccy) / 1,000,000 |
fillSize × fillPrice × value × conv(quoteCcy, ccy) / 1,000,000 |
CASH_FIXED |
0 |
fillSize × value × conv(quoteCcy, ccy) / 1,000,000 |
FX_NDF and NDF use the Other security types column.
CASH treats the result directly as cash in ccy; CASH_NOTIONAL converts the applicable base or quote amount into that currency. CASH_FIXED is proportional to filled quantity.
POINTS uses an absolute quote-price amount per internal quantity; it does not multiply value by symbol.price_unit. These formulas do not separately apply symbol.contract_size.