> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# debug_accountRange | Robinhood

> Robinhood Chain API method that enumerates all accounts at a given block with paging capability. debug_accountRange on Robinhood Chain via Chainstack.

Robinhood Chain API method that enumerates all accounts at a given block with paging capability. This method returns a range of accounts stored in the state trie, providing account details such as balance, nonce, code hash, and storage. It is useful for state inspection and debugging purposes.

> [!NOTE]
>
> Learn how to [deploy a node](https://docs.chainstack.com/docs/debug-and-trace-apis.md#robinhood-chain) with the debug and trace API methods enabled.

> [!WARNING]
>
> This method is available for post-Nitro blocks only (block 22,207,815 and later). For pre-Nitro blocks, use the `arbtrace_*` methods instead.

## Parameters

* `blockNrOrHash` — the block number in hex format or block tag (`latest`, `earliest`, `pending`, `safe`, `finalized`), or block hash.
* `start` — the start key hash for pagination, encoded as hex bytes. Use `0x0000000000000000000000000000000000000000000000000000000000000000` to start from the beginning.
* `maxResults` — the maximum number of accounts to return. Capped at 256.
* `nocode` — if `true`, excludes contract bytecode from the result.
* `nostorage` — if `true`, excludes storage data from the result.
* `incompletes` — if `true`, includes accounts without known addresses.

## Response

* `result` — an object containing the state dump:
  * `root` — the state root hash of the block.
  * `accounts` — a map of account addresses to account data:
    * `balance` — the account balance in Wei.
    * `nonce` — the account nonce.
    * `root` — the storage root hash.
    * `codeHash` — the hash of the account's contract code.
    * `code` — the contract bytecode (omitted if `nocode` is `true`).
    * `storage` — the account's storage slots (omitted if `nostorage` is `true`).
    * `address` — the account address.
  * `next` — the next key hash for pagination. Use this value as the `start` parameter in the next call to continue iterating.

## `debug_accountRange` code examples

```javascript ethers.js theme={"system"}
const { JsonRpcProvider } = require("ethers");

const provider = new JsonRpcProvider("CHAINSTACK_NODE_URL");

async function call() {
  const result = await provider.send("debug_accountRange", ["0xc3007d", "0x0", "0x0", 5, true, true, true]);
  console.log(result);
}

call();
```

```python web3.py theme={"system"}
from web3 import Web3

node_url = "CHAINSTACK_NODE_URL"
web3 = Web3(Web3.HTTPProvider(node_url))

result = web3.provider.make_request("debug_accountRange", ["0xc3007d", "0x0", "0x0", 5, true, true, true])
print(result)
```

```shell cURL theme={"system"}
curl -X POST "CHAINSTACK_NODE_URL" \
  -H "Content-Type: application/json" \
  --data '{
    "jsonrpc": "2.0",
    "method": "debug_accountRange",
    "params": ["0xc3007d", "0x0", "0x0", 5, true, true, true],
    "id": 1
  }'
```


## OpenAPI

````yaml openapi/robinhood_node_api/debug_and_trace/debug_accountRange.json POST /
openapi: 3.0.0
info:
  title: Chainstack Node API
  version: 1.0.0
  description: This is an API for interacting with a Chainstack node.
servers:
  - url: >-
      https://robinhood-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e
security: []
paths:
  /:
    post:
      tags:
        - upload
      summary: debug_accountRange
      operationId: debug_accountRange
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: debug_accountRange
                params:
                  type: array
                  items:
                    anyOf:
                      - type: string
                        title: Block
                        description: >-
                          Block number or tag (latest, earliest, pending, safe,
                          finalized).
                      - type: string
                        title: Start
                        description: The start key hash for pagination, as hex bytes.
                      - type: integer
                        title: Max Results
                        description: Maximum number of accounts to return (max 256).
                      - type: boolean
                        title: No Code
                        description: If true, excludes contract code from the result.
                      - type: boolean
                        title: No Storage
                        description: If true, excludes storage from the result.
                      - type: boolean
                        title: Incompletes
                        description: If true, includes accounts without addresses.
                  default:
                    - '0xc3007d'
                    - '0x0'
                    - '0x0'
                    - 5
                    - true
                    - true
                    - true
      responses:
        '200':
          description: Returns the account range dump.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object

````