Skip to main content

View Account

view_account request type

This endpoint allows you to view account information on the NEAR blockchain.

Network
FastNear API keyNo saved key
Get API key
Endpointhttps://rpc.mainnet.fastnear.com
Finality

The latest block with full finality. Highest confidence, with the most confirmation lag.

Authnone detected
Live Response

Responses from the selected endpoint appear here after you run a request.

Live response output will appear here after you run a request.

Request reference

application/json

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"
  }
}

Request schema

object
requires jsonrpc, id, method, params
jsonrpc *string
2.0
id *string

Example: fastnear

method *string
query
params *object
requires request_type, account_id, finality
account_id *string

NEAR account ID

request_type *string
view_account
finality *string

Block finality

finalnear-finaloptimistic

Response reference

200 application/json

Successful response

Response schema

objectJsonRpcResponse
requires jsonrpc, id
jsonrpc *string
2.0
id *one of
stringnumber
resultobject
requires amount, locked, code_hash, storage_usage

A view of the account

amount *string

Amount in yoctoNEAR

code_hash *string

Base58-encoded hash

global_contract_account_idstringnullable

NEAR account ID

global_contract_hashstringnullable

Base58-encoded hash

locked *string

Amount in yoctoNEAR

storage_paid_atinteger

TODO(2271): deprecated.

Default: 0

storage_usage *integer
errorobject
codeinteger
messagestring
dataobject