Query

Returns view of account information.

Parameters

  • method: query

  • params:

    • request_type: view_account

    • finality: optimistic or final

    • account_id: "example.testnet"

Returns

Returns a view of account information.

Example

//Request
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc": "2.0","id": "dontcare","method": "query","params": {"request_type": "view_account","finality": "final","account_id": "flavian.near"}}' http://<your_app_id>.ankr.com
//Response
{
"jsonrpc": "2.0",
"result": {
"amount": "37962853329919927901672129",
"locked": "0",
"code_hash": "55E7imniT2uuYrECn17qJAk9fLcwQW4ftNSwmCJL5Di",
"storage_usage": 357216,
"storage_paid_at": 0,
"block_height": 20772545,
"block_hash": "E6bNwyq8se1jJdriLgADme8KCuu3GRFKx5AptKRdFprA"
},
"id": "dontcare"
}