Get balance
curl --request GET \
--url https://api.privy.io/v1/wallets/{wallet_id}/balance \
--header 'Authorization: Basic <encoded-value>' \
--header 'privy-app-id: <privy-app-id>'HttpResponse<String> response = Unirest.get("https://api.privy.io/v1/wallets/{wallet_id}/balance")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {
method: 'GET',
headers: {'privy-app-id': '<privy-app-id>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.privy.io/v1/wallets/{wallet_id}/balance', 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.privy.io/v1/wallets/{wallet_id}/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"privy-app-id: <privy-app-id>"
],
]);
$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.privy.io/v1/wallets/{wallet_id}/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"balances": [
{
"chain": "tempo",
"asset": "ousd",
"raw_value": "1000000",
"raw_value_decimals": 6,
"display_values": {
"ousd": "1",
"usd": "1"
}
}
]
}Wallets
Get balance
Get the balance of a wallet by wallet ID.
GET
/
v1
/
wallets
/
{wallet_id}
/
balance
Get balance
curl --request GET \
--url https://api.privy.io/v1/wallets/{wallet_id}/balance \
--header 'Authorization: Basic <encoded-value>' \
--header 'privy-app-id: <privy-app-id>'HttpResponse<String> response = Unirest.get("https://api.privy.io/v1/wallets/{wallet_id}/balance")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {
method: 'GET',
headers: {'privy-app-id': '<privy-app-id>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.privy.io/v1/wallets/{wallet_id}/balance', 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.privy.io/v1/wallets/{wallet_id}/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"privy-app-id: <privy-app-id>"
],
]);
$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.privy.io/v1/wallets/{wallet_id}/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"balances": [
{
"chain": "tempo",
"asset": "ousd",
"raw_value": "1000000",
"raw_value_decimals": 6,
"display_values": {
"ousd": "1",
"usd": "1"
}
}
]
}SDK methods
Learn more about fetching wallet balances using our SDKs here.Authorizations
Query Parameters
asset
WalletEthereumAsset · enum<string>WalletSolanaAsset · enum<string>WalletTronAsset · enum<string>Option 4 · enum<string>[]
Named asset(s) to query (e.g. eth, usdc). Use together with chain to scope the query. Cannot be used with token.
Available options:
usdc, usdc.e, eth, avax, pol, bnb, mon, usdt, eurc, usdb, ousd, pathusd Chain(s) to query named assets on (e.g. tempo, base). Use together with asset. Cannot be used with token.
Available options:
ethereum, arbitrum, avalanche, base, tempo, linea, optimism, polygon, bsc, solana, tron, zksync_era, robinhood, unichain, worldchain, ink, soneium, megaeth, hyperevm, hypercore, arc, monad, tempo_testnet, hoodi, sepolia, arbitrum_sepolia, avalanche_fuji, base_sepolia, linea_testnet, optimism_sepolia, polygon_amoy, bsc_testnet, solana_devnet, solana_testnet, tron_nile, robinhood_testnet, ink_sepolia Was this page helpful?

