Methods for managing custom commissions
Use these methods to manage and configure custom commission groups:
GET[host]/back-api/backoffice/tradefeerules/group |
|
GET[host]/back-api/backoffice/tradefeerules/group/{groupId} |
|
POST[host]/back-api/backoffice/tradefeerules/group |
|
PUT[host]/back-api/backoffice/tradefeerules/group/{groupId} |
|
DELETE[host]/back-api/backoffice/tradefeerules/group/{groupId} |
|
GET[host]/back-api/backoffice/tradefeerules |
|
GET[host]/back-api/backoffice/tradefeerules/tradefeerule/{tradeFeeRuleId} |
|
POST[host]/back-api/backoffice/tradefeerules/tradefeerule |
|
PUT[host]/back-api/backoffice/tradefeerules/tradefeerule/{tradeFeeRuleId} |
|
DELETE[host]/back-api/backoffice/tradefeerules/tradefeerule/{tradeFeeRuleId} |
|
GET[host]/back-api/backoffice/tradefeerules/user/{user}/group |
|
POST[host]/back-api/backoffice/tradefeerules/users/group |
Identify the commission groups to which various users are assigned |
PUT[host]/back-api/backoffice/tradefeerules/user/{userId}/group/{groupId} |
|
POST[host]/back-api/backoffice/tradefeerules/group/users |
|
DELETE[host]/back-api/backoffice/tradefeerules/user/{userId}/group |
|
GET[host]/back-api/backoffice/tradefeerules/group/{groupId}/users |
Get a list of custom commission groups
Use this method to obtain a complete list of custom commission groups.
Request
Header parameters:
Authorization: Bearer <access_token>
GET[host]/back-api/backoffice/tradefeerules/group
GET /back-api/backoffice/tradefeerules/group HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
Response
- id number
The commission group identifier.
- description string
The commission group description.
[
{
"id": 1,
"description": "custom commission group 1"
}
]
Get a custom commission group
Use this method to obtain a description of a specific custom commission group.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- groupId
The commission group identifier.
GET[host]/back-api/backoffice/tradefeerules/group/{groupId}
GET /back-api/backoffice/tradefeerules/group1 HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
Response
- id number
The commission group identifier.
- description string
The commission group description.
{
"id": 1,
"description": "custom commission group 1"
}
Create a custom commission group
Use this method to create a new custom commission group with a specified description.
Request
Header parameters:
Authorization: Bearer <access_token>
Body:
- description string
The commission group description.
POST[host]/back-api/backoffice/tradefeerules/group
POST /back-api/backoffice/tradefeerules/group HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
{
"description": "custom commission group 1"
}
Response
- id number
The commission group identifier.
- description string
The commission group description.
{
"id": 1,
"description": "custom commission group 1"
}
Customize the commission group description
Use this method to modify a description of a custom commission group.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- group_id
The commission group identifier.
Body:
- description string
The commission group description.
PUT[host]/back-api/backoffice/tradefeerules/group/{groupId}
POST /back-api/backoffice/tradefeerules/group/1 HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
{
"description": "custom commission group 1"
}
Response
- id number
The commission group identifier.
- description string
The commission group description.
{
"id": 1,
"description": "custom commission group 1"
}
Delete a custom commission group
Use this method to remove a specified commission group.
A commission group can be removed only if it doesn’t have any users and markets assigned to it.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- group_id
The commission group identifier.
DELETE[host]/back-api/backoffice/tradefeerules/group/{groupId}
DELETE /back-api/backoffice/tradefeerules/group/1 HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
Response
In case of success, HTTP code 200
is returned.
Get a detailed list of custom commission groups
Use this method to learn about the maker and taker fees charged on each market included into a specified commission group.
Request
Header parameters:
Authorization: Bearer <access_token>
Query parameters
- group_id
The commission group identifier.
GET[host]/back-api/backoffice/tradefeerules
GET /back-api/backoffice/tradefeerules?groupId=1 HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
Response
- id number
The commission group identifier.
- description string
The commission group description.
- tradeFeeRules array
The following information is provided about each market rule included in the commission group:
- id number
The identifier of a market rule included in the commission group.
- tradeFeeRuleGroupId number
The identifier of a commission group in which the market rule is included.
- id string
The currency pair identifier (such as
btc_usdt
):{baseAsset}_{quoteAsset}
.- makerFee number
The commission rate applied to market makers that provide liquidity to this market.
This value is normalized to 0–1 range (for example, 0.05 will indicate a fee of 5%). A maker fee of 5% is considered substantial and may be detrimental to business.
- takerFee number
The commission rate applied to market takers that diminish liquidity on this market.
This value is normalized to 0–1 range (for example, 0.05 will indicate a fee of 5%). A taker fee of 5% is considered substantial and may be detrimental to business.
{
"groups": [
{
"id": 1,
"description": "custom commission group 1",
"tradeFeeRules": [
{
"id": 1,
"tradeFeeRuleGroupId": 1,
"marketId": "btc_usdt",
"makerFee": 0.4,
"takerFee": 0.5
}
]
}
]
}
Get the fees defined for a market in a commission group
Use this method to obtain information about the rules according to which maker and taker fees are charged on a specific market defined for a commission group.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- tradeFeeRuleId
The identifier of a market rule included in the commission group.
GET[host]/back-api/backoffice/tradefeerules/tradefeerule/{tradeFeeRuleId}
GET /back-api/backoffice/tradefeerules/tradefeerule/1 HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
Response
- id number
The identifier of a market rule included in the commission group.
- tradeFeeRuleGroupId number
The identifier of a commission group in which the market rule is included.
- id string
The currency pair identifier (such as
btc_usdt
):{baseAsset}_{quoteAsset}
.- makerFee number
The commission rate applied to market makers that provide liquidity to this market.
This value is normalized to 0–1 range (for example, 0.05 will indicate a fee of 5%).
- takerFee number
The commission rate applied to market takers that diminish liquidity on this market.
This value is normalized to 0–1 range (for example, 0.05 will indicate a fee of 5%).
{
"id": 1,
"tradeFeeRuleGroupId": 1,
"marketId": "btc_usdt",
"makerFee": 0.4,
"takerFee": 0.5
}
Specify custom fees for a market in a commission group
Use this method to define the rules according to which maker and taker fees are charged on a specific market defined for a commission group.
Request
Header parameters:
Authorization: Bearer <access_token>
Body:
- TradeFeeRuleGroupId number
The identifier of a commission group in which the market rule is to be included.
- MarketId string
The identifier of a currency pair (such as
btc_usdt
) to be included in the commission group:{baseAsset}_{quoteAsset}
.Identical currency pairs cannot be added to the same commission group.
- makerFee number
The commission rate applied to market makers that provide liquidity to this market.
This value is normalized to 0–1 range (for example, 0.05 will indicate a fee of 5%). A maker fee of 5% is considered substantial and may be detrimental to business.
- takerFee number
The commission rate applied to market takers that diminish liquidity on this market.
This value is normalized to 0–1 range (for example, 0.05 will indicate a fee of 5%). A taker fee of 5% is considered substantial and may be detrimental to business.
POST[host]/back-api/backoffice/tradefeerules/tradefeerule
POST /back-api/backoffice/tradefeerules/tradefeerule HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
{
"TradeFeeRuleGroupId": 1,
"MarketId": "btc_usdt",
"MakerFee": 0.4,
"TakerFee": 0.5
}
Response
- id number
The market rule identifier.
- tradeFeeRuleGroupId number
The commission group identifier.
- marketId string
The currency pair identifier.
- makerFee number
The commission rate applied to market makers that provide liquidity to this market.
- takerFee number
The commission rate applied to market takers that diminish liquidity on this market.
{
"id": 1,
"tradeFeeRuleGroupId": 1,
"marketId": "btc_usdt",
"makerFee": 0.4,
"takerFee": 0.5
}
Customize custom fees for a market in a commission group
Use this method to customize the rules according to which maker and taker fees are charged on a specific market defined for a commission group.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- tradeFeeRuleId
The market rule identifier.
Body:
- makerFee number
The commission rate applied to market makers that provide liquidity to this market.
This value is normalized to 0–1 range (for example, 0.05 will indicate a fee of 5%). A maker fee of 5% is considered substantial and may be detrimental to business.
- takerFee number
The commission rate applied to market takers that diminish liquidity on this market.
This value is normalized to 0–1 range (for example, 0.05 will indicate a fee of 5%). A taker fee of 5% is considered substantial and may be detrimental to business.
PUT[host]/back-api/backoffice/tradefeerules/tradefeerule/{tradeFeeRuleId}
PUT /back-api/backoffice/tradefeerules/tradefeerule/1 HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
{
"makerFee": 0.4,
"takerFee": 0.5
}
Response
- id number
The market rule identifier.
- tradeFeeRuleGroupId number
The commission group identifier.
- marketId string
The currency pair identifier.
- makerFee number
The commission rate applied to market makers that provide liquidity to this market.
- takerFee number
The commission rate applied to market takers that diminish liquidity on this market.
{
"id": 1,
"tradeFeeRuleGroupId": 1,
"marketId": "btc_usdt",
"makerFee": 0.2,
"takerFee": 0.3
}
Delete a market from a commission group
Use this method to remove a rule according to which maker and taker fees are charged on a specific market defined for a commission group.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- tradeFeeRuleId
The market rule identifier.
DELETE[host]/back-api/backoffice/tradefeerules/tradefeerule/{tradeFeeRuleId}
DELETE /back-api/backoffice/tradefeerules/tradefeerule/1 HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
Response
In case of success, HTTP code 200
is returned.
Identify the commission group to which a user is assigned
Use this method to identify a commission group to which a specified user is assigned.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- userId
The user identifier, in the GUID string format.
GET[host]/back-api/backoffice/tradefeerules/user/{user}/group
GET /back-api/backoffice/tradefeerules/user/d746ac21-5837-00ed-3319-56b26a723179/group HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
Response
The response includes the identifier of a commission group to which the user is assigned.
Identify the commission groups to which various users are assigned
Use this method to identify commission groups to which specified users are assigned.
Request
Header parameters:
Authorization: Bearer <access_token>
Body:
- UserIds array
An array of user identifiers, in the GUID string format.
POST[host]/back-api/backoffice/tradefeerules/users/group
POST /back-api/backoffice/tradefeerules/users/group HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
{
"UserIds": ["d746ac21-5837-00ed-3319-56b26a723179", "a7b62dbb-85da-555e-a1a3-4b5004ef982e", "857c7473-fcbb-358d-e5ae-34df14bb357e"]
}
Response
- userId string
The user identifier, in the GUID string format.
- tradeFeeRuleGroupInfo object
The following information is provided about a commission group to which a specified user is assigned:
- id number
The commission group identifier.
- id string
The commission group description.
{
"userId": "d746ac21-5837-00ed-3319-56b26a723179",
"tradeFeeRuleGroupInfo": {
"id": 1,
"description": "custom commission group 1"
}
}
Assign a user to a custom commission group
Use this method to assign a user to a custom commission group.
Each user can only be assigned to a single commission group.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- userId
The user identifier, in the GUID string format.
- groupId
The commission group identifier.
PUT[host]/back-api/backoffice/tradefeerules/user/{userId}/group/{groupId}
PUT /back-api/backoffice/tradefeerules/user/d746ac21-5837-00ed-3319-56b26a723179/group/1 HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
Response
In case of success, HTTP code 200
is returned.
Assign multiple users to a custom commission group
Use this method to assign multiple users to a custom commission group.
Each user can only be assigned to a single commission group.
Request
Header parameters:
Authorization: Bearer <access_token>
Body:
- UserIds array
An array of user identifiers, in the GUID string format.
- groupId number
The commission group identifier.
POST[host]/back-api/backoffice/tradefeerules/group/users
POST /back-api/backoffice/tradefeerules/group/users HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
{
"UserIds": ["fae88128-6b5b-7637-0b16-74f0a6ecfa97",
"b74810a1-e7be-307b-035b-616f5e147ee0"],
"GroupId": 1
}
Response
- userId string
The user identifier, in the GUID string format.
- groupId number
The commission group identifier.
If a specified user is not found, an error is returned instead of the group ID for this user.
[
{
"userId": "fae88128-6b5b-7637-0b16-74f0a6ecfa97",
"groupId": 1
},
{
"userId": "b74810a1-e7be-307b-035b-616f5e147ee0",
"error": "User with id 'b74810a1-e7be-307b-035b-616f5e147ee0' was not found"
}
]
Remove a user from a custom commission group
Use this method to remove a user from a custom commission group.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- userId
The user identifier, in the GUID string format.
DELETE[host]/back-api/backoffice/tradefeerules/user/{userId}/group
DELETE /back-api/backoffice/tradefeerules/user/fae88128-6b5b-7637-0b16-74f0a6ecfa97/group HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
Response
In case of success, HTTP code 200
is returned.
Get users assigned to a custom commission group
Use this method to identify users assigned to a specified commission group.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- groupId
The commission group identifier.
GET[host]/back-api/backoffice/tradefeerules/group/{groupId}/users
GET /back-api/backoffice/tradefeerules/group/1/users HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g
Response
- userIds array
An array of user identifiers, in the GUID string format.
[
"3ae2608c-499d-a883-95e8-c46fd5d19076",
"8f3b7743-64ff-8c79-9d94-4c23d01e78df"
]