Bonuses
Use these methods to manage bonuses allocated to clients.
GET[host]/api/v2/my/bonuses |
|
GET[host]/api/v2/my/bonuses/{bonusId} |
|
GET[host]/api/v2/my/bonuses/temporary |
|
GET[host]/api/v2/my/bonuses/temporary{temporaryId} |
|
POST[host]/api/v2/my/bonuses/temporary{temporaryId}/claim |
Get a list of bonuses
Use this method to obtain a list of bonuses allocated to clients.
Request
Header parameters:
Authorization: Bearer <access_token>
Query parameters:
The following sorting parameter is available for this method:
- createTime
The date and time when a bonus was allocated.
Refer to the Query parameters section in the API Overview for details on applying filter and sorting parameters.
GET[host]/api/v2/my/bonuses
curl --location --request GET 'https://host.name/api/v2/my/bonuses?limit=10&offset=0&sort_order=desc&sort_by=createTime' \
--header 'accept-language: <string>' \
--header 'Authorization: Bearer <token>'
Response
A response contains an array of Bonus objects providing information about the bonus programs matching the request parameters.
Get bonus details
Use this method to obtain detailed information about a specified bonus.
Request
Path parameters:
- bonusId required
The bonus identifier.
GET[host]/api/v2/my/bonuses/{bonusId}
curl --location --request GET 'https://host.name/api/v2/my/bonuses/:bonusId' \
--header 'accept-language: <string>' \
--header 'Authorization: Bearer <token>'
Response
A response contains a Bonus object providing information about the specified bonus.
Get a list of temporary bonuses
Use this method to obtain a list of the temporary bonus programs that are available to clients in the B2Core UI.
Request
Header parameters:
Authorization: Bearer <access_token>
Query parameters:
The following sorting parameter is available for this method:
- createTime
The date and time when a temporary bonus program was configured.
Refer to the Query parameters section in the API Overview for details on applying sorting parameters.
GET[host]/api/v2/my/bonuses/temporary
curl --location --request GET 'https://host.name/api/v2/my/bonuses/temporary?limit=10&offset=0&sort_order=desc&sort_by=createTime' \
--header 'accept-language: <string>' \
--header 'Authorization: Bearer <token>'
Response
A response contains an array of Temporary Bonus objects providing information about the temporary bonus programs matching the request parameters.
Get temporary bonus details
Use this method to obtain detailed information about a specified temporary bonus program.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- temporaryId required
The identifier of a temporary bonus program.
GET[host]/api/v2/my/bonuses/temporary{temporaryId}
curl --location --request GET 'https://host.name/api/v2/my/bonuses/temporary/:temporaryId' \
--header 'accept-language: <string>' \
--header 'Authorization: Bearer <token>'
Response
A response contains an array of Temporary Bonus objects providing information about the specified temporary bonus program.
Claim a temporary bonus
Use this method to claim for a client a bonus that can be awarded under a temporary bonus program.
Request
Header parameters:
Authorization: Bearer <token>
Body:
Specify the following parameter for a new temporary bonus program:
- accountId integer
The identifier of a client trading account.
POST[host]/api/v2/my/bonuses/temporary{temporaryId}/claim
curl --location --request POST 'https://host.name/api/v2/my/bonuses/temporary/:temporaryId/claim' \
--header 'accept-language: <string>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"accountId": 1
}'
Response
A response contains a Temporary Bonus object providing information about the bonus that was claimed.