Wallets
Get Wallet Balance

Get Wallet Balance

This fetches the token balances for a specific cryptocurrency wallet by its unique ID. Returns available and pending balances for each token.


Endpoint

GET : {{baseURL}}/v1/ramp/wallet/{walletId}/balance


Example cURL Request

curl --request GET \
  --url {{baseURL}}v1/ramp/wallet/{{walletId}}/balance \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: {{API_KEY}}'

Headers

Header NameValueDescription
Content-Typeapplication/jsonSpecifies the media type
x-api-key{{API_KEY}}Your API authentication key

Path Parameters

ParameterTypeDescription
walletIdstringThe unique identifier of the wallet

Request Parameters

  • Query Parameters: None
  • Request Body: None

Success Response (200 OK)

{
  "message": "fetch wallet balance successfully",
  "status": "success",
  "data": {
    "token": [
      {
        "id": "ad14b5f8-bf59-4300-8749-xxxxxxxxxxxxx",
        "name": "Polygon",
        "symbol": "POL",
        "decimals": 18,
        "balance": 7.42,
        "pendingBalance": 4.18756533,
        "network": {
          "name": "Polygon",
          "blockchain": "MATIC"
        }
      }
    ]
  }
}

Response Fields

FieldTypeDescription
messagestringGeneral status message from the server
statusstringOperation status, typically "success"
dataobjectContains token balance information

Fields inside data.token[] array:

FieldTypeDescription
idstringUnique token identifier
namestringName of the token (e.g. Polygon)
symbolstringToken symbol (e.g. POL)
decimalsintegerNumber of decimal places
balancenumberCurrent available balance
pendingBalancenumberPending (unconfirmed) balance
network.namestringName of the blockchain network
network.blockchainstringBlockchain code (e.g. MATIC)

Error Codes

CodeMessageMeaning
401UnauthorizedMissing or invalid API key
404Not FoundWallet not found
500Internal Server ErrorServer-side error fetching wallet balance