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:
accept-language: <string>
Accept: application/json
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 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Response
A response contains an array of Bonus objects providing information about the bonuses matching the request parameters.
Get bonus details
Use this method to obtain detailed information about a specific bonus.
Request
Header parameters:
accept-language: <string>
Accept: application/json
Authorization: Bearer <access_token>
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/1' \
--header 'accept-language: <string>' \
--header 'Accept: application/json' \
--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 temporary bonuses that clients can claim in the B2Core UI.
Request
Header parameters:
accept-language: <string>
Accept: application/json
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 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Response
A response contains an array of Temporary Bonus objects providing information about the temporary bonuses matching the request parameters.
Get temporary bonus details
Use this method to obtain detailed information about a specific temporary bonus.
Request
Header parameters:
accept-language: <string>
Accept: application/json
Authorization: Bearer <access_token>
Path parameters:
- temporaryId required
The identifier of a temporary bonus.
GET[host]/api/v2/my/bonuses/temporary/{temporaryId}
curl --location --request GET 'https://host.name/api/v2/my/bonuses/temporary/1 \
--header 'accept-language: <string>' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Response
A response contains a Temporary Bonus objects providing information about the specified temporary bonus.
Claim a temporary bonus
Use this method to claim a temporary bonus for the currently authenticated client.
Request
Header parameters:
accept-language: <string>
Content-Type: application/json
Accept: application/json
Authorization: Bearer <token>
Path parameters:
- temporaryId required
The identifier of a temporary bonus.
Body:
- accountId integer required
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/1/claim' \
--header 'accept-language: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"accountId": 1
}'
Response
A response contains a Temporary Bonus object providing information about the temporary bonus that was claimed.