Wallets
Get Historical Token Balance
Get a wallet’s balance of a specific token or native SOL at a past timestamp, datetime, or slot.
GET
/
v1
/
wallet
/
{wallet}
/
balance-at
Get historical balance
curl --request GET \
--url 'https://api.helius.xyz/v1/wallet/{wallet}/balance-at?api-key='import requests
url = "https://api.helius.xyz/v1/wallet/{wallet}/balance-at?api-key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.helius.xyz/v1/wallet/{wallet}/balance-at?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}/balance-at?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}/balance-at?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}/balance-at?api-key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.helius.xyz/v1/wallet/{wallet}/balance-at?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{
"wallet": "5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9",
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"isNative": false,
"balance": "284961463.392936",
"balanceRaw": "284961463392936",
"decimals": 6,
"requested": {
"time": 1736536800,
"slot": null,
"datetime": null
},
"asOf": {
"slot": 313000000,
"signature": "5Cyy7Mh9nVgFq3T8wJp2sKxR4dE6bA1uZoNcLrXmYqUpon",
"blockTime": 1736536794
}
}{
"error": "Exactly one of time, datetime, or slot must be provided",
"code": 400
}{
"error": "API key required. Pass via ?api-key=xxx or X-Api-Key header",
"code": 401
}{
"error": "Invalid wallet address",
"code": 400,
"details": "'invalid-address' is not a valid Solana address"
}{
"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."
}{
"error": "UPSTREAM_ERROR",
"code": 502,
"details": "Upstream RPC request failed. Please retry."
}Each request costs 100 credits.
Request Parameters
Solana wallet address (base58 encoded)
Token mint address. For native SOL, use
So11111111111111111111111111111111111111111.Unix timestamp in seconds. Returns the balance as of this time. Provide exactly one of
time, datetime, or slot.Datetime string. Accepted formats:
2025-01-10 (UTC midnight), 2025-01-10 19:20:00,
2025-01-10T19:20:00 (seconds optional), or with an explicit timezone
(2025-01-10T19:20:00Z, ...+02:00). Interpreted as UTC unless an explicit
timezone is included. Provide exactly one of time, datetime, or slot.Slot number. Returns the balance as of this slot. Exact and deterministic. Provide exactly one of
time, datetime, or slot.Path Parameters
Query Parameters
Datetime string. Accepted formats: 2025-01-10 (UTC midnight), 2025-01-10 19:20:00,
2025-01-10T19:20:00 (seconds optional), or with an explicit timezone
(2025-01-10T19:20:00Z, ...+02:00). Interpreted as UTC unless an explicit
timezone is included. Provide exactly one of time, datetime, or slot.
Response
Historical balance retrieved successfully
Was this page helpful?
⌘I
Get historical balance
curl --request GET \
--url 'https://api.helius.xyz/v1/wallet/{wallet}/balance-at?api-key='import requests
url = "https://api.helius.xyz/v1/wallet/{wallet}/balance-at?api-key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.helius.xyz/v1/wallet/{wallet}/balance-at?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}/balance-at?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}/balance-at?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}/balance-at?api-key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.helius.xyz/v1/wallet/{wallet}/balance-at?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{
"wallet": "5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9",
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"isNative": false,
"balance": "284961463.392936",
"balanceRaw": "284961463392936",
"decimals": 6,
"requested": {
"time": 1736536800,
"slot": null,
"datetime": null
},
"asOf": {
"slot": 313000000,
"signature": "5Cyy7Mh9nVgFq3T8wJp2sKxR4dE6bA1uZoNcLrXmYqUpon",
"blockTime": 1736536794
}
}{
"error": "Exactly one of time, datetime, or slot must be provided",
"code": 400
}{
"error": "API key required. Pass via ?api-key=xxx or X-Api-Key header",
"code": 401
}{
"error": "Invalid wallet address",
"code": 400,
"details": "'invalid-address' is not a valid Solana address"
}{
"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."
}{
"error": "UPSTREAM_ERROR",
"code": 502,
"details": "Upstream RPC request failed. Please retry."
}