get-user-balance¶
The client can implement this endpoint and use any URL for it.
Client needs to notify GR8 Tech about the URL of this endpoint for future configuration as it will be used by Sportsbook iFrame on the backend side.
Sportsbook iFrame uses this endpoint to understand if the user has enough money for bet placement.
Sportsbook iFrame uses this endpoint during calculating max possible bet amount when the player clicks on the “Max“ button in betslip. So NFRs to this endpoint depend on the users' activity. Our experience shows us that the expected load of this endpoint is near 20 requests per second.

In case of an error response - the max bet amount will be calculated only based on the current limitations of the system and previous players' bets.
Note
The operator must provide different URLs per tenant for these endpoints if he has a few Sportsbook iFrame brands/tenants or build different logic depending on the X-Brand and X-Operator-Id headers.
Request¶
[GET] /api/v2/wallet/{playerId}/balances
-H 'X-Brand: BRANDXXX' <--- get this info from our GR8 Tech managers
-H 'X-Operator-Id: OPERATORYYY' <--- get this info from our GR8 Tech managers
Request parameters:
| Param | Param location | Type | Required | Description |
|---|---|---|---|---|
| playerId | Path | string | + | Id of player |
| currencies | Query | string | - | currencies that will be returned in response. Optional parameter, by default, all available currencies are returned. |
| X-Brand | Header | string | + | on of tenant identifiers which represent site and operator. They will be configured during the tenant setup process and can’t be changed. |
| X-Operator-Id | Header | string | + | one of tenant identifiers which represent site and operator. They will be configured during the tenant setup process and can’t be changed. |
Success response¶
Danger
Please, pay attantion, that values for "locked" and "bonus" should be ALWAYS 0 (ZERO) if you do not integrated with our bonus services
Success response json schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": { // platform
"sport": {
"type": "object",
"properties": { // product
"main": {
"$ref": "#/definitions/productBalancesType"
},
"sportsbook": {
"$ref": "#/definitions/productBalancesType"
}
},
"required": ["main", "sportsbook"]
}
},
"definitions": {
"productBalancesType": {
"type": "object",
"patternProperties": {
"^.*$": { // currency
"$ref": "#/definitions/balancesType"
}
}
},
"balancesType": {
"type": "object",
"properties": {
"cash": { "type": "string" }, // required
"bonus": { "type": "string" }, // required
"locked": { "type": "string" }, // required
"retract": { "type": "string" }
},
"required": ["cash", "bonus", "locked"],
"additionalProperties": false
}
}
}
{
"sport": {
"main": {
"USD": {
"cash": "500", // <-- it’s a real player’s money
"bonus": "0", // <-- should be ALWAYS 0 (ZERO), because it is used only with our sportsbook bonus services
"locked": "0" // <-- should be ALWAYS 0 (ZERO), because it is used only with our sportsbook bonus services
}
},
"sportsbook": {
"USD": {
"cash": "500", // <-- it’s a real player’s money
"bonus": "0", // <-- should be ALWAYS 0 (ZERO), because it is used only with our sportsbook bonus services
"locked": "0" // <-- should be ALWAYS 0 (ZERO), because it is used only with our sportsbook bonus services
}
}
}
}
{
"sport": {
"main": {
"USD": {
"cash": "500",
"bonus": "0",
"locked": "0"
},
"EUR": {
"cash": "250",
"bonus": "0",
"locked": "0"
},
"GBP": {
"cash": "100",
"bonus": "0",
"locked": "0"
}
},
"sportsbook": {
"USD": {
"cash": "500",
"bonus": "0",
"locked": "0"
},
"EUR": {
"cash": "250",
"bonus": "0",
"locked": "0"
},
"GBP": {
"cash": "100",
"bonus": "0",
"locked": "0"
}
}
}
}
Danger
ATTENTION!
Get balance request will be always executed after EACH transaction request by default. If you want to disable it, please contact with AM/PM of GR8 TECH team
Error response¶
Error response schema
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"origin": {
"type": "string"
}
},
"additionalProperties": true,
"required": [
"code",
"message",
"origin"
]
},
"additionalProperties": true,
"required": [
"error"
]
}
}
{
"error": {
"code": "error.user.not-found",
"message": "User with specified Id was not found",
"origin": "Set your company name"
},
"alreadyProcessed": false
}
Question
The “Wallet error codes” section describes the list of possible errors.