curl --request GET \
--url https://sandbox-api.polygon.technology/v0.11/wallets/{id}/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.polygon.technology/v0.11/wallets/{id}/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox-api.polygon.technology/v0.11/wallets/{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://sandbox-api.polygon.technology/v0.11/wallets/{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: Bearer <token>"
],
]);
$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://sandbox-api.polygon.technology/v0.11/wallets/{id}/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.polygon.technology/v0.11/wallets/{id}/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.polygon.technology/v0.11/wallets/{id}/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"customerId": "<string>",
"asset": "<string>",
"chain": "<string>",
"blockchainAsset": {
"chainId": "<string>",
"tokenId": "<string>"
},
"address": "<string>",
"balance": "<string>",
"currencyName": "<string>",
"estimatedBalanceValue": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Get current balance of a specific wallet
Returns the current balance of a specific wallet, including the display
balance and its estimated value in the currency requested via
estimatedBalanceCurrencyCode (defaults to USD).
curl --request GET \
--url https://sandbox-api.polygon.technology/v0.11/wallets/{id}/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.polygon.technology/v0.11/wallets/{id}/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox-api.polygon.technology/v0.11/wallets/{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://sandbox-api.polygon.technology/v0.11/wallets/{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: Bearer <token>"
],
]);
$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://sandbox-api.polygon.technology/v0.11/wallets/{id}/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.polygon.technology/v0.11/wallets/{id}/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.polygon.technology/v0.11/wallets/{id}/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"customerId": "<string>",
"asset": "<string>",
"chain": "<string>",
"blockchainAsset": {
"chainId": "<string>",
"tokenId": "<string>"
},
"address": "<string>",
"balance": "<string>",
"currencyName": "<string>",
"estimatedBalanceValue": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
Token from POST /auth/token
Path Parameters
Wallet ID.
Query Parameters
ISO 4217 currency for the estimated value. Defaults to USD.
Response
The request has succeeded.
The current balance of a single wallet, with its estimated value in the requested currency.
The balance entry for the wallet.
Hide child attributes
Hide child attributes
Public wallet ID, format wlt_<typeID> (legacy acc_ also accepted on input).
^[a-z]+_([0-9a-hjkmnp-tv-z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$Public OMS customer ID, format cst_<typeID>.
^[a-z]+_([0-9a-hjkmnp-tv-z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$Canonical asset symbol (e.g. "usdc").
Canonical chain name (e.g. "polygon").
On-chain wallet address.
Balance in display units (decimal string).
Human-readable currency name (e.g. "USD Coin").
Estimated balance value in the currency requested via the
estimatedBalanceCurrencyCode query param, computed by the upstream
provider at read time. Defaults to USD when the query param is
omitted.
When the cached OMS-side balance row was last updated.
Was this page helpful?