Fetch Wallet Balance
This API is to fetch wallet balance of a user based on network
GRAPHQL
Headers
| Fields | Type | Description | Example | Data Management |
|---|---|---|---|---|
| URL | string | {base_url}/users | ||
| GRAPHQL | string | QUERY | ||
| content-type | string | JSON | application/json | |
| x-access-token | string | session token with validity | token | user token |
Request
{
list_wallet_balance(network: "solana") {
message
data {
wallet_address
balance
network
}
}
}
Request Parameters
| Fields | Type | Description | Required |
|---|---|---|---|
| network | string | the network identifier from wallets' list of profile API | ✔ |
Success
{
"data": {
"list_wallet_balance": {
"message": "data listed",
"data": {
"wallet_address": "8jULEWgWBsFoxGGBGgrD3tBGFsXNcKrDzbHRNgkrnTZf",
"balance": 0.00398,
"network": "solana"
}
}
}
}
Error
{
"errors": [
{
"message": "Unauthorized",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": ["list_wallet_balance"]
}
],
"data": {
"list_wallet_balance": null
}
}