Get Accounts by ID
Return the account transactions and balance information given an account alias, an account id, or an evm address. The information will be limited to at most 1000 token balances for the account as outlined in HIP-367. When the timestamp parameter is supplied, we will return transactions and account state for the relevant timestamp query. Balance information will be accurate to within 15 minutes of the provided timestamp query. Historical stake and reward information is not currently available so these fields contain current data. Historical ethereum nonce information is also currently not available and may not be the exact value at a provided timestamp.
curl --request GET \
--url https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}import requests
url = "https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}', 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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}",
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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}"
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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}")
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{
"account": "0.0.8",
"alias": "HIQQEXWKW53RKN4W6XXC4Q232SYNZ3SZANVZZSUME5B5PRGXL663UAQA",
"auto_renew_period": null,
"balance": {
"timestamp": "0.000002345",
"balance": 80,
"tokens": [
{
"token_id": "0.0.200001",
"balance": 8
}
]
},
"created_timestamp": "1562591528.000123456",
"decline_reward": false,
"deleted": false,
"ethereum_nonce": 10,
"evm_address": "0xac384c53f03855fa1b3616052f8ba32c6c2a2fec",
"expiry_timestamp": null,
"key": null,
"max_automatic_token_associations": 200,
"memo": "entity memo",
"pending_reward": 100,
"receiver_sig_required": false,
"staked_account_id": null,
"staked_node_id": 3,
"stake_period_start": "172800000.000000000"
}{
"_status": {
"messages": [
{
"message": "Invalid parameter: account.id"
},
{
"message": "Invalid Transaction id. Please use \\shard.realm.num-sss-nnn\\ format where sss are seconds and nnn are nanoseconds"
}
]
}
}{
"_status": {
"messages": [
{
"message": "Not found"
}
]
}
}20 Compute Units.
Path Parameters
Query Parameters
CONSENSUSCREATETOPIC, CONSENSUSDELETETOPIC, CONSENSUSSUBMITMESSAGE, CONSENSUSUPDATETOPIC, CONTRACTCALL, CONTRACTCREATEINSTANCE, CONTRACTDELETEINSTANCE, CONTRACTUPDATEINSTANCE, CRYPTOADDLIVEHASH, CRYPTOAPPROVEALLOWANCE, CRYPTOCREATEACCOUNT, CRYPTODELETE, CRYPTODELETEALLOWANCE, CRYPTODELETELIVEHASH, CRYPTOTRANSFER, CRYPTOUPDATEACCOUNT, ETHEREUMTRANSACTION, FILEAPPEND, FILECREATE, FILEDELETE, FILEUPDATE, FREEZE, NODESTAKEUPDATE, SCHEDULECREATE, SCHEDULEDELETE, SCHEDULESIGN, SYSTEMDELETE, SYSTEMUNDELETE, TOKENASSOCIATE, TOKENBURN, TOKENCREATION, TOKENDELETION, TOKENDISSOCIATE, TOKENFEESCHEDULEUPDATE, TOKENFREEZE, TOKENGRANTKYC, TOKENMINT, TOKENPAUSE, TOKENREVOKEKYC, TOKENUNFREEZE, TOKENUNPAUSE, TOKENUPDATE, TOKENWIPE, UNCHECKEDSUBMIT, UNKNOWN, UTILPRNG Response
OK
The staking period during which either the staking settings for this account changed (such as starting staking or changing stakedNode) or the most recent reward was earned, whichever is later. If this account is not currently staked to a node, then the value is null
^\d{1,10}(\.\d{1,9})?$"1586567700.453054000"
curl --request GET \
--url https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}import requests
url = "https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}', 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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}",
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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}"
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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/accounts/{idOrAliasOrEvmAddress}")
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{
"account": "0.0.8",
"alias": "HIQQEXWKW53RKN4W6XXC4Q232SYNZ3SZANVZZSUME5B5PRGXL663UAQA",
"auto_renew_period": null,
"balance": {
"timestamp": "0.000002345",
"balance": 80,
"tokens": [
{
"token_id": "0.0.200001",
"balance": 8
}
]
},
"created_timestamp": "1562591528.000123456",
"decline_reward": false,
"deleted": false,
"ethereum_nonce": 10,
"evm_address": "0xac384c53f03855fa1b3616052f8ba32c6c2a2fec",
"expiry_timestamp": null,
"key": null,
"max_automatic_token_associations": 200,
"memo": "entity memo",
"pending_reward": 100,
"receiver_sig_required": false,
"staked_account_id": null,
"staked_node_id": 3,
"stake_period_start": "172800000.000000000"
}{
"_status": {
"messages": [
{
"message": "Invalid parameter: account.id"
},
{
"message": "Invalid Transaction id. Please use \\shard.realm.num-sss-nnn\\ format where sss are seconds and nnn are nanoseconds"
}
]
}
}{
"_status": {
"messages": [
{
"message": "Not found"
}
]
}
}