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.
Documentation
Try it now
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: ''
}
}