Skip to main content
GET
/
v1
/
wallets
/
{walletId}
/
addresses
/
{addressId}
/
balance
Get Balance
curl --request GET \
  --url https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/balance \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/balance"

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.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/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.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/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 => [
"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.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/balance"

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.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/balance")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/balance")

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
{
  "data": {
    "asset": {
      "asset": {
        "address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
        "blockchain": {
          "createdAt": "2024-05-27T08:31:14.966Z",
          "derivationPath": "m/44'/60'/0'/0",
          "id": "74733889-4ecd-403e-9840-94e87c043f24",
          "isActive": true,
          "isEvmCompatible": true,
          "logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800080/crypto-assets/Base_Network_Logo_vqyh7r.png",
          "name": "base",
          "slug": "base",
          "symbol": "eth",
          "tokenStandard": null,
          "updatedAt": "2024-10-27T07:52:16.115Z"
        },
        "createdAt": "2024-05-27T08:31:19.442Z",
        "decimals": 6,
        "id": "0927dc05-7d4e-4c0a-82c6-98ceb170ab84",
        "isActive": true,
        "logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800083/crypto-assets/usd-coin-usdc-logo_fs9mhv.png",
        "name": "USD Coin",
        "network": "testnet",
        "standard": null,
        "symbol": "USDC",
        "updatedAt": "2024-05-27T09:24:11.963Z"
      },
      "createdAt": "2024-08-22T10:34:38.785Z",
      "id": "dde9b0ce-599d-4ee4-9a17-960f06aa50a8",
      "isActive": true,
      "updatedAt": "2024-08-22T10:34:38.785Z"
    },
    "balance": "0.0",
    "convertedBalance": "0.0"
  },
  "message": "Balance fetched successfully",
  "statusCode": 200
}

Authorizations

x-api-key
string
header
required

Path Parameters

walletId
string
required
Example:

"YOUR_WALLET_ID"

addressId
string
required
Example:

"ADDRESS_ID"

Query Parameters

assetId
string
Example:

"WALLET_ASSET_ID"

Response

200 - application/json

200

data
object
message
string
Example:

"Balance fetched successfully"

statusCode
number
Example:

200