Get Balances
curl --request GET \
--url https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/balances \
--header 'x-api-key: <api-key>'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/balances"
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}/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://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/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: <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}/balances"
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}/balances")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/balances")
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"
},
{
"asset": {
"asset": {
"address": "0x0000000000000000000000000000000000000000",
"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.440Z",
"decimals": 18,
"id": "ec9c982f-5d83-46e7-bda5-386100e795fc",
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800081/crypto-assets/ethereum-eth-logo_idraq2.png",
"name": "Ethereum",
"network": "testnet",
"standard": null,
"symbol": "ETH",
"updatedAt": "2024-05-27T09:24:11.962Z"
},
"createdAt": "2024-08-22T10:05:46.167Z",
"id": "ff99a04e-b279-4933-9075-29f0ae12eea0",
"isActive": true,
"updatedAt": "2024-08-22T10:05:46.167Z"
},
"balance": "0.039999890347315835",
"convertedBalance": "97.14333369858776372265"
}
],
"message": "Balances fetched successfully",
"statusCode": 200
}Address
Get Balances
This endpoint retrieves the balances associated with a specific address in a wallet.
GET
/
v1
/
wallets
/
{walletId}
/
addresses
/
{addressId}
/
balances
Get Balances
curl --request GET \
--url https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/balances \
--header 'x-api-key: <api-key>'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/balances"
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}/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://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/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: <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}/balances"
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}/balances")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/balances")
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"
},
{
"asset": {
"asset": {
"address": "0x0000000000000000000000000000000000000000",
"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.440Z",
"decimals": 18,
"id": "ec9c982f-5d83-46e7-bda5-386100e795fc",
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800081/crypto-assets/ethereum-eth-logo_idraq2.png",
"name": "Ethereum",
"network": "testnet",
"standard": null,
"symbol": "ETH",
"updatedAt": "2024-05-27T09:24:11.962Z"
},
"createdAt": "2024-08-22T10:05:46.167Z",
"id": "ff99a04e-b279-4933-9075-29f0ae12eea0",
"isActive": true,
"updatedAt": "2024-08-22T10:05:46.167Z"
},
"balance": "0.039999890347315835",
"convertedBalance": "97.14333369858776372265"
}
],
"message": "Balances fetched successfully",
"statusCode": 200
}授权
响应
200 - application/json
200
Show child attributes
Show child attributes
示例:
[
{
"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"
},
{
"asset": {
"asset": {
"address": "0x0000000000000000000000000000000000000000",
"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.440Z",
"decimals": 18,
"id": "ec9c982f-5d83-46e7-bda5-386100e795fc",
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800081/crypto-assets/ethereum-eth-logo_idraq2.png",
"name": "Ethereum",
"network": "testnet",
"standard": null,
"symbol": "ETH",
"updatedAt": "2024-05-27T09:24:11.962Z"
},
"createdAt": "2024-08-22T10:05:46.167Z",
"id": "ff99a04e-b279-4933-9075-29f0ae12eea0",
"isActive": true,
"updatedAt": "2024-08-22T10:05:46.167Z"
},
"balance": "0.039999890347315835",
"convertedBalance": "97.14333369858776372265"
}
]
示例:
"Balances fetched successfully"
示例:
200
⌘I

