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 IDstringRequiredMerchant User ID
currencyCurrencystringRequiredCurrency
timestampCurrent TimestampintRequiredThe 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
800100: Service exception
800101: Member does not exist
800102: Currency does not exist
800103: Query balance failed