View Account
view_account request type
Fetch an account's balance, storage usage, and code hash at a chosen block or finality.
view_account request type
Fetch an account's balance, storage usage, and code hash at a chosen block or finality.
Responses from the selected endpoint appear here after you run a request.
Live response output will appear here after you run a request.
This operation accepts a JSON-RPC body over POST to /.
Required request inputs: yes
{
"jsonrpc": "2.0",
"id": "fastnear",
"method": "query",
"params": {
"account_id": "root.near",
"request_type": "view_account",
"finality": "final"
}
}jsonrpc *string2.0id *stringmethod *stringqueryparams *objectaccount_id *stringNEAR account ID
request_type *stringview_accountfinality *stringBlock finality
finalnear-finaloptimisticSuccessful response
jsonrpc *string2.0id *one ofresultobjectA view of the account
amount *stringAmount in yoctoNEAR
bootstrap_nonceintegernullableThe nonce an uninitialized account's own transactions must use, present only while it is uninitialized. A self-signed state init is the one transaction such an account can send, and this is the only way for a client to learn the nonce it must carry: there is no access key to query.
code_hash *stringBase58-encoded hash
global_contract_account_idstringnullableNEAR account ID
global_contract_hashstringnullableBase58-encoded hash
locked *stringAmount in yoctoNEAR
statestringWhether an account's state has been installed.
Only universal accounts can be uninitialized: they come into existence when
a transfer funds a 0u id whose state init has not been applied yet. A
deterministic 0s account waiting for its state init is an ordinary V1
account with no contract, not this.
initializeduninitializedstorage_paid_atintegerDeprecated and unused; nodes always return 0.
storage_usage *integerTotal storage used by the account, in bytes.
errorobjectcodeintegermessagestringdataobject