Skip to main content

Balance Query API Format

1. Balance Query API Format​

API Path​

  • POST
  • /aigame/v1/wallet/balance

Request Parameters​

ParameterNameTypeRequiredDescription
agent_idMerchant IDstringRequiredMerchant ID
user_idMerchant User IDstringRequiredUser ID on Merchant Side, string length minimum 3, maximum 64, Only English, numbers, and _
currencyCurrencystringRequiredCurrency
timestampCurrent Timestampint64RequiredThe timestamp when calling the API (in milliseconds, valid for ten minutes)
signSignaturestringRequiredSee API documentation for signature algorithm

Response Parameters​

ParameterNameTypeDescription
codeResponse CodeintError Code
messageResponse MessagestringError Message
dataResponse DatadictResponse Data Details
--balancePlayer BalancestringPlayer Balance
--currencyCurrencystringCurrency

Request Example​

curl --location 'https://merchant-address/aigame/v1/wallet/balance' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "agent001",
"user_id": "testUid03",
"currency": "VND2",
"timestamp": 1732589849000,
"sign": "5c06ed3c98106c627fff753d9499c7a2"
}'

Response Example​

{
"code": 200,
"message": "success",
"data": {
"balance": "1282.66",
"currency": "VND2"
}
}

Error Codes​

200 Success
408000: Parameter error
600100: Signature error
600101 Invalid parameters
800100: Service exception
800101: Member does not exist
800102: Currency does not exist
800103: Query balance failed