Get Wallet Balance
curl --request GET \
--url https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances \
--header 'X-API-KEY: <x-api-key>'import requests
url = "https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
headers = {"X-API-KEY": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<x-api-key>'}};
fetch('https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances', 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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances",
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: <x-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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<x-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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
.header("X-API-KEY", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<x-api-key>'
response = http.request(request)
puts response.read_body[
{
"token": "usdc",
"decimals": 6,
"balances": {
"base": "121000000",
"ethereum": "121000000",
"total": "242000000"
}
},
{
"token": "eth",
"decimals": 18,
"balances": {
"ethereum": "1000000000000000000",
"total": "1000000000000000000"
}
}
]{
"error": true,
"message": "<error message>"
}Wallets
Get Wallet Balance
Get the balance of a wallet for a given chain and currency
API scope required: wallets:balance.read
GET
/
v1-alpha2
/
wallets
/
{walletLocator}
/
balances
Get Wallet Balance
curl --request GET \
--url https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances \
--header 'X-API-KEY: <x-api-key>'import requests
url = "https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
headers = {"X-API-KEY": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<x-api-key>'}};
fetch('https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances', 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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances",
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: <x-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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<x-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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
.header("X-API-KEY", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<x-api-key>'
response = http.request(request)
puts response.read_body[
{
"token": "usdc",
"decimals": 6,
"balances": {
"base": "121000000",
"ethereum": "121000000",
"total": "242000000"
}
},
{
"token": "eth",
"decimals": 18,
"balances": {
"ethereum": "1000000000000000000",
"total": "1000000000000000000"
}
}
]{
"error": true,
"message": "<error message>"
}This is an alpha API and subject to change.
Headers
API key required for authentication
Path Parameters
A wallet locator can be of the format:
<walletAddress>email:<email>:<walletType>userId:<userId>:<walletType>userId:<userId>:<walletType>(white label user example)phoneNumber:<phoneNumber>:<walletType>twitter:<handle>:<walletType>x:<handle>:<walletType>
Query Parameters
The blockchain(s) to query. Comma-separated list of chains
The tokens to query. Comma-separated list
Response
Returns the balance of the wallet for the given chain and currency
The token
Available options:
ape, bnb, coti, eth, matic, mnt, pol, sei, chz, avax, xai, fuel, hbar, vic, ip, zcx, u2u, usdc, usdce, busd, usdxm, usdt, credit, weth, degen, brett, toshi, eurc, superverse, pirate, wld, bonk, trump, fartcoin, giga, moodeng, jailstool, wen, mlg, duo, pep, harambe, usedcar, vine, fartboy, pnut, stonks, mew, baby, michi, butthole, anglerfish, usa, chillguy, sigma, maneki, purpe, lockin, y2k, fafo, nub, fullsend, shoggoth, mini, llm, sc, fatgf, pwease, popcat, spx, fwog, mother, wif, fric, etf, gyat, bigballs, goat, stupid, duko, bitcoin, buttcoin, mcdull, skbdi, elon4afd, mumu, gme, biao, fred, pengu, asscoin, bhad, habibi, quant, hammy, boden, dolan, nap, scf, titcoin, zerebro, rfc, luce, melania, slerf, bome, ban, pippin, ghibli, figure, retardio, memesai, dogeai, memecoin, routine, troll, nobody, italianrot, jockey, pppp, useless, gork, hosico, neet, urmom, bert, fog, mog, boopa, wizard, trencher, chacha, aurafarm, sol, sui, apt, sfuel, xion Example:
"eth"
The number of decimals of the token
Example:
18
The balance of the wallet in different chains
Show child attributes
Show child attributes
Example:
[
{
"token": "usdc",
"decimals": 6,
"balances": {
"base": "121000000",
"ethereum": "121000000",
"total": "242000000"
}
},
{
"token": "eth",
"decimals": 18,
"balances": {
"ethereum": "1000000000000000000",
"total": "1000000000000000000"
}
}
]
Was this page helpful?

