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 Name | Value | Description |
---|---|---|
Content-Type | application/json | Specifies the media type |
x-api-key | {{API_KEY}} | Your API authentication key |
Path Parameters
Parameter | Type | Description |
---|---|---|
walletId | string | The 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
Field | Type | Description |
---|---|---|
message | string | General status message from the server |
status | string | Operation status, typically "success" |
data | object | Contains token balance information |
Fields inside data.token[]
array:
Field | Type | Description |
---|---|---|
id | string | Unique token identifier |
name | string | Name of the token (e.g. Polygon) |
symbol | string | Token symbol (e.g. POL) |
decimals | integer | Number of decimal places |
balance | number | Current available balance |
pendingBalance | number | Pending (unconfirmed) balance |
network.name | string | Name of the blockchain network |
network.blockchain | string | Blockchain code (e.g. MATIC) |
Error Codes
Code | Message | Meaning |
---|---|---|
401 | Unauthorized | Missing or invalid API key |
404 | Not Found | Wallet not found |
500 | Internal Server Error | Server-side error fetching wallet balance |