Skip to main content
GET
/
v1
/
wallet
/
balance
cURL
curl --request GET \
  --url 'https://api.coinstats.app/v1/wallet/balance?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&blockchain=ethereum' \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://api.coinstats.app/v1/wallet/balance?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&blockchain=ethereum"

headers = {"X-API-KEY": "<api-key>"}

response = requests.request("GET", url, headers=headers)

print(response.json())
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://api.coinstats.app/v1/wallet/balance?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&blockchain=ethereum', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/wallet/balance?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&blockchain=ethereum",
CURLOPT_RETURNTRANSFER => true,
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"
"io"
"net/http"
)

func main() {

url := "https://api.coinstats.app/v1/wallet/balance?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&blockchain=ethereum"

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.coinstats.app/v1/wallet/balance?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&blockchain=ethereum")
.header("X-API-KEY", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.coinstats.app/v1/wallet/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
[
  {
    "coinId": "ethereum",
    "amount": 1.5,
    "name": "Ethereum",
    "symbol": "ETH",
    "price": 2000.5,
    "priceBtc": 0.05,
    "imgUrl": "https://static.coinstats.app/coins/1650455629727.png",
    "pCh24h": 5.25,
    "rank": 2,
    "volume": 15000000000,
    "chain": "ethereum",
    "connectionId": "ethereum",
    "decimals": 18,
    "contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
  }
]
{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}
40 credits per request
In Query field “connectionId”: credits are multiplied by the number of values.
If the value of “connectionId” in Query is “all”, multiplier is 400 credits.
In Query field “blockchain”: credits are multiplied by the number of values.
If the value of “blockchain” in Query is “all”, multiplier is 400 credits.
Multipliers can be applied multiple times.

  • Token balances on one or more blockchains
  • Current USD price, BTC price, and 24h change
  • Token contract addresses and decimals (ERC20-style tokens)
  • Market data: rank, 24h volume
  • address: Wallet address to query
  • One of connectionId or blockchain (if both provided, connectionId is used):
    • Single value (e.g., “ethereum”)
    • Comma-separated values (“ethereum,polygon”)
    • “all” — every supported network (top-tier EVM chains forced; other chains bounded by a per-chain latency limit and may be skipped)
    • “forceall” — every supported network, no latency limit (the response is delayed by the slowest chain)
  • The top-tier EVM chains forced under “all” are: ethereum, binacesmartchain, base-wallet, polygon-wallet, arbitrum-wallet, optimism-wallet, avalanche-wallet, hyperevm-wallet, monad-wallet, plasma-wallet. In rare cases a slow non-top-tier chain may be omitted; use “forceall” to wait for everything.

Authorizations

X-API-KEY
string
header
required

API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.

Query Parameters

address
string
required

The blockchain wallet address to query balances for

Example:

"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"

connectionId
string

The identifier of connection from /wallet/blockchains call response. Either connectionId or blockchain must be provided. If both are provided, connectionId will be used. Accepts "all" — top-tier EVM chains (ethereum, binacesmartchain, base-wallet, polygon-wallet, arbitrum-wallet, optimism-wallet, avalanche-wallet, hyperevm-wallet, monad-wallet, plasma-wallet) are always included; other chains are subject to a per-chain latency limit and may be skipped from the response. Use "forceall" instead to wait for every supported chain regardless of latency.

Example:

"base-wallet"

blockchain
string

The blockchain network identifier from /wallet/blockchains call response. Either connectionId or blockchain must be provided. If both are provided, connectionId will be used. Accepts "all" — top-tier EVM chains (ethereum, binacesmartchain, base-wallet, polygon-wallet, arbitrum-wallet, optimism-wallet, avalanche-wallet, hyperevm-wallet, monad-wallet, plasma-wallet) are always included; other chains are subject to a per-chain latency limit and may be skipped from the response. Use "forceall" instead to wait for every supported chain regardless of latency.

Example:

"base"

Response

Get wallet balance

coinId
string
required

Unique identifier for the cryptocurrency

Example:

"ethereum"

amount
number
required

The total balance amount of this cryptocurrency in the wallet

Example:

1.5

name
string
required

Full name of the cryptocurrency

Example:

"Ethereum"

symbol
string
required

Trading symbol of the cryptocurrency

Example:

"ETH"

price
number
required

Current price in USD

Example:

2000.5

priceBtc
number
required

Current price in BTC

Example:

0.05

imgUrl
string
required

URL of the cryptocurrency logo image

Example:

"https://static.coinstats.app/coins/1650455629727.png"

pCh24h
number
required

Price change percentage in the last 24 hours

Example:

5.25

rank
number
required

Market cap rank of the cryptocurrency

Example:

2

volume
number
required

24-hour trading volume in USD

Example:

15000000000

chain
string

The blockchain network where this token exists

Example:

"ethereum"

connectionId
string

The blockchain network identifier that was used in the query

Example:

"ethereum"

decimals
number

Number of decimal places for token precision (mainly for ERC20 tokens)

Example:

18

contractAddress
string

Smart contract address for tokens (e.g. ERC20, BEP20)

Example:

"0xdac17f958d2ee523a2206206994597c13d831ec7"