Get Wallet Balances
Retrieve token balances and SOL holdings for a Solana wallet address.
curl --request GET \
--url 'https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key='import requests
url = "https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"balances": [
{
"mint": "So11111111111111111111111111111111111111112",
"balance": 1.5,
"decimals": 9,
"tokenProgram": "spl-token",
"symbol": "SOL",
"name": "Solana",
"pricePerToken": 145.32,
"usdValue": 217.98,
"logoUri": "https://example.com/sol-logo.png"
}
],
"totalUsdValue": 217.98,
"pagination": {
"page": 1,
"limit": 100,
"hasMore": true
},
"nfts": [
{
"mint": "7Xq8wXyXVqfBPPqVJjPDwG9zN5wCVxBYZ6z7vPYBzr6F",
"compressed": false,
"name": "Degen Ape",
"imageUri": "https://example.com/nft.png",
"collectionName": "Degen Ape Academy",
"collectionAddress": "DegN1dXmU2uYa4n7U9qTh7YNYpK4u8L9qXx7XqYqJfGH"
}
]
}{
"error": "Invalid wallet address",
"code": 400,
"details": "'invalid-address' is not a valid Solana address"
}{
"error": "API key required. Pass via ?api-key=xxx or X-Api-Key header",
"code": 401
}{
"error": "RATE_LIMIT_EXCEEDED",
"code": 429,
"details": "Too many requests. Retry after 2 seconds."
}{
"error": "INTERNAL_ERROR",
"code": 500,
"details": "An unexpected error occurred. Please retry."
}Request Parameters
Authorizations
API key passed as query parameter
Path Parameters
Solana wallet address (base58 encoded)
^[1-9A-HJ-NP-Za-km-z]{32,44}$Query Parameters
Page number for pagination (1-indexed)
x >= 1Maximum number of tokens per page
1 <= x <= 100Include tokens with zero balance
Include native SOL in results
Include NFTs in results (max 100, first page only)
Response
Wallet balances retrieved successfully
Array of token balances for the current page, including native SOL. When showNative=true, SOL appears as the first element with mint address So11111111111111111111111111111111111111112. Other tokens are sorted by USD value (descending).
Show child attributes
Show child attributes
Total USD value of balances on this page (not total portfolio value)
217.98
Pagination metadata. Users must manually request additional pages using the page parameter.
Show child attributes
Show child attributes
Array of NFT holdings (only included if showNfts=true, max 100, first page only)
Show child attributes
Show child attributes
Was this page helpful?
curl --request GET \
--url 'https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key='import requests
url = "https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.helius.xyz/v1/wallet/{wallet}/balances?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"balances": [
{
"mint": "So11111111111111111111111111111111111111112",
"balance": 1.5,
"decimals": 9,
"tokenProgram": "spl-token",
"symbol": "SOL",
"name": "Solana",
"pricePerToken": 145.32,
"usdValue": 217.98,
"logoUri": "https://example.com/sol-logo.png"
}
],
"totalUsdValue": 217.98,
"pagination": {
"page": 1,
"limit": 100,
"hasMore": true
},
"nfts": [
{
"mint": "7Xq8wXyXVqfBPPqVJjPDwG9zN5wCVxBYZ6z7vPYBzr6F",
"compressed": false,
"name": "Degen Ape",
"imageUri": "https://example.com/nft.png",
"collectionName": "Degen Ape Academy",
"collectionAddress": "DegN1dXmU2uYa4n7U9qTh7YNYpK4u8L9qXx7XqYqJfGH"
}
]
}{
"error": "Invalid wallet address",
"code": 400,
"details": "'invalid-address' is not a valid Solana address"
}{
"error": "API key required. Pass via ?api-key=xxx or X-Api-Key header",
"code": 401
}{
"error": "RATE_LIMIT_EXCEEDED",
"code": 429,
"details": "Too many requests. Retry after 2 seconds."
}{
"error": "INTERNAL_ERROR",
"code": 500,
"details": "An unexpected error occurred. Please retry."
}