POSTblock_effects

NEAR Mainnethttps://near-mainnet.nodit.io/

Returns, by change type, the accounts whose state changed in a block. Each item holds only the change type (type) and the account ID. Query the changed values with the changes method.

Use finality for the latest block, or block_id (block height or block hash) for a specific block. The result list is under the changes key. If the block cannot be found, the UNKNOWN_BLOCK error is returned. EXPERIMENTAL_changes_in_block is the former name of this method.

Request Body
jsonrpcstringrequired
idstringrequired

Request ID. Any string; it is returned unchanged in the response.

methodstringrequired
finalitystring (enum)

Specifies the block finality. Cannot be used together with block_id.

  • optimistic: the latest block the node has received (may be reorganized)
  • near-final: a Doomslug-final block (not reverted in most cases)
  • final: a fully finalized block
block_idinteger

Specifies the block to query by block height (integer) or block hash (base58 string). Cannot be used together with finality.

sync_checkpointstring (enum)

Block selector. genesis returns the genesis block; earliest_available returns the oldest block the node holds.

Responses
jsonrpcstring

JSON-RPC version

idstring

Request ID

block_hashstring

Hash of the queried block (base58)

changesobject[]

Accounts whose state changed. An account appears per change type, and may repeat as many times as the same kind of change occurred.

typestring (enum)

Change type

  • account_touched: account info (balance, locked amount, storage usage, code hash) changed, or the account was deleted
  • access_key_touched: an access key was added, changed, or deleted
  • data_touched: contract storage data was changed or deleted
  • contract_code_touched: contract code was deployed or deleted
account_idstring

Account ID whose state changed

namestring (enum)

Error class. REQUEST_VALIDATION_ERROR (invalid request), HANDLER_ERROR (processing error), INTERNAL_ERROR (node internal error)

causeobject

The specific cause of the error.

namestring

Name of the error cause (e.g. UNKNOWN_BLOCK, UNKNOWN_ACCOUNT, PARSE_ERROR)

infoobject

Additional information about the error (block hash, height, account ID, etc.)

codeinteger

Legacy JSON-RPC error code (e.g. -32000 server error, -32700 parse error, -32601 method not found)

messagestring

Legacy error message

datastring

Legacy error details

X-API-KEY
RequestCU50
cURL
curl -X POST "https://near-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "dontcare",
    "method": "block_effects",
    "params": {
      "finality": "final",
      "block_id": 220785385,
      "sync_checkpoint": "genesis"
    }
  }'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": "dontcare",
  "result": {
    "block_hash": "CWoAHhkRjrCiBMgCQsEKVBckqeRg8r1kwx6Npa9PiD8j",
    "changes": [
      {
        "account_id": "00000000012.near",
        "type": "account_touched"
      },
      {
        "account_id": "token.sweat",
        "type": "account_touched"
      },
      {
        "account_id": "token.sweat",
        "type": "data_touched"
      }
    ]
  }
}