Get balances for native + selected token assets
curl --request GET \
--url https://api.walletsuite.io/api/balances/{address} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.walletsuite.io/api/balances/{address}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.walletsuite.io/api/balances/{address}', 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.walletsuite.io/api/balances/{address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.walletsuite.io/api/balances/{address}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.walletsuite.io/api/balances/{address}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.walletsuite.io/api/balances/{address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ok": true,
"code": "<string>",
"message": "<string>",
"data": {
"chain": "<string>",
"address": "<string>",
"fiatCurrency": "<string>",
"totalFiatValue": 123,
"assets": [
{
"symbol": "<string>",
"decimals": 123,
"smallestUnit": 123,
"amount": 123,
"fiatCurrency": "<string>",
"tokenContract": "<string>",
"fiatValue": 123
}
]
}
}Balances
Get balances for native + selected token assets
Returns native + token balances in parallel, skips zero balances, and includes total fiat value. If assetIds is omitted, uses the default supported set:
- EVM (ethereum): USDT + USDC
- TRON: USDT
GET
/
api
/
balances
/
{address}
Get balances for native + selected token assets
curl --request GET \
--url https://api.walletsuite.io/api/balances/{address} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.walletsuite.io/api/balances/{address}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.walletsuite.io/api/balances/{address}', 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.walletsuite.io/api/balances/{address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.walletsuite.io/api/balances/{address}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.walletsuite.io/api/balances/{address}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.walletsuite.io/api/balances/{address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ok": true,
"code": "<string>",
"message": "<string>",
"data": {
"chain": "<string>",
"address": "<string>",
"fiatCurrency": "<string>",
"totalFiatValue": 123,
"assets": [
{
"symbol": "<string>",
"decimals": 123,
"smallestUnit": 123,
"amount": 123,
"fiatCurrency": "<string>",
"tokenContract": "<string>",
"fiatValue": 123
}
]
}
}Authorizations
API key provided by WalletSuite team
Path Parameters
Address on the specified chain
Query Parameters
Blockchain identifier
Fiat currency for valuation
Optional list of token contract ids to include. If empty, defaults are used.
Include native balance in response
Was this page helpful?