curl --request GET \
--url 'https://api.etherscan.io/v2/api?apikey='import requests
url = "https://api.etherscan.io/v2/api?apikey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.etherscan.io/v2/api?apikey=', 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.etherscan.io/v2/api?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.etherscan.io/v2/api?apikey="
req, _ := http.NewRequest("GET", url, nil)
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.etherscan.io/v2/api?apikey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.etherscan.io/v2/api?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status":"1",
"message":"OK",
"result":[
{
"account":"0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
"balance":"40891631566070000000000"
},
{
"account":"0x63a9975ba31b0b9626b34300f7f627147df1f526",
"balance":"332567136222827062478"
},
{
"account":"0x198ef1ec325a96cc354c7266a038be8b5c558f67",
"balance":"12005264493462223951724"
}
]
}
Get Native Balance for Multiple Addresses
Retrieves the native token balance held by multiple addresses in a single call.
curl --request GET \
--url 'https://api.etherscan.io/v2/api?apikey='import requests
url = "https://api.etherscan.io/v2/api?apikey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.etherscan.io/v2/api?apikey=', 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.etherscan.io/v2/api?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.etherscan.io/v2/api?apikey="
req, _ := http.NewRequest("GET", url, nil)
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.etherscan.io/v2/api?apikey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.etherscan.io/v2/api?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status":"1",
"message":"OK",
"result":[
{
"account":"0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
"balance":"40891631566070000000000"
},
{
"account":"0x63a9975ba31b0b9626b34300f7f627147df1f526",
"balance":"332567136222827062478"
},
{
"account":"0x198ef1ec325a96cc354c7266a038be8b5c558f67",
"balance":"12005264493462223951724"
}
]
}
{
"status":"1",
"message":"OK",
"result":[
{
"account":"0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
"balance":"40891631566070000000000"
},
{
"account":"0x63a9975ba31b0b9626b34300f7f627147df1f526",
"balance":"332567136222827062478"
},
{
"account":"0x198ef1ec325a96cc354c7266a038be8b5c558f67",
"balance":"12005264493462223951724"
}
]
}
Authorizations
Enter your Etherscan API key, or set one up if you don't have one.
Query Parameters
Chain ID to query, eg 1 for Ethereum, 42161 for Arbitrum from our supported chains.
Set to account for this endpoint.
Set to balancemulti for this endpoint.
Comma-separated list of addresses to query, up to a maximum of 20 addresses per call.
Use latest for the last block number of the chain. Also accepts a specific block number in hex format, like 0x10d4f up to the last 128 blocks.
Response
Successful response
1 if the request returned data, 0 otherwise. A status of 0 can indicate an error or a valid request that returned no records.
OK on success, otherwise an error description such as NOTOK. See common error messages.
Show child attributes
Show child attributes