/
v3.0.11Get access

getBalance For Integration

Is used to retrieve the authenticated user’s current account balance from the backend. The call sends a balance request via the Swarm API and extracts the user-specific balance from the returned profile data using the current userId.

Request parameters:

The method works without parameters

Call example:

getBalance()

Response examples:

{
  code: 0,
  rid: 88327858,
  data: {
    data: {
      profile: {
        '89353549': {
          balance: 0,
          bonus_balance: 0,
          sport_bonus: 0
        }
      }
    }
  },
  hasError: false,
  error: {
    message: ''
  }
}

Response parameters:

NameDescriptionTypeValues
balance
It's the current cash balance. It represents the user’s main real-money account balance. This is the amount of withdrawable funds available for placing bets, playing games,number-
bonus_balance
Represents the user’s general available bonus balance. These are promotional credits.number-
sport_bonus
Represents the user’s sports-specific bonus balance. These funds are promotional credits restricted to sports betting activities only.number-