Balance

POST/wallet/balance

Parameters (Kit SDK)

When using @sonabuild/kit, you only provide these parameters. The SDK automatically handles context (wallet, origin) and encryption.

symbolsarray

Token symbols to query (e.g., ["SOL", "USDC"]). Omit for all supported tokens.

Array items:
string

Full Request Schema (Direct API)

If calling the API directly (without Kit), send this complete structure. The Kit SDK constructs this automatically from your params.

contextobjectrequired
walletstringrequired

User wallet public key

originstringrequired

Request origin URL

paramsobjectrequired
symbolsarray

Token symbols to query (e.g., ["SOL", "USDC"]). Omit for all supported tokens.

Array items:
string

Response Schema

All responses follow this structure. The data field contains operation-specific results (see example response →).

successbooleanrequired
metadataobject
protocolstringrequired
querystringrequired
timestampnumberrequired
dataobject | object
errorstring | null
curl -X POST https://api.sona.build/wallet/balance \
  -H "Content-Type: application/json" \
  -d '{
  "context": {
    "wallet": "YourWalletPublicKey",
    "origin": "https://your-app.com"
  },
  "params": {
    "symbols": [
      "USDC",
      "SOL"
    ]
  }
}'

Example Response

{
  "transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQACC...",
  "metadata": {
    "protocol": "wallet",
    "operation": "operation",
    "timestamp": 1766817731853
  },
  "data": {
    "result": "success"
  }
}