nr_getTransactionByAddressCount

This API method helps you to get transfers count for any fromAddress, toAddress, contractAddress, etc.

📘

Supported on BSC and ETH mainnet only.

Parameters

  • category - example: List [ "external", "20" ]; ------ external, internal; 20, 721, 1155;
  • fromBlock - hexadecimal string or latest, the difference between fromBlock and toBlock must be less than or equal to 1000, when both of them be specified. If request has fromBlock but miss toBlock, toBlock will be auto filled by fromBlock+1000
  • toBlock - hexadecimal string or latest, the difference between fromBlock and toBlock must be less than or equal to 1000, when both of them be specified. If request has toBlock but miss fromBlock, fromBlock will be auto filled by toBlock-1000
  • addresses - address, must not be null
  • addressType - option: from, to, contract, null if all of addressType
  • excludeZeroValue - boolean, true for excluding zero value data, false for all data

Returns

  • result - transfers for any address

API Endpoint

The format of a MegaNode API endpoint is https://{chain}-{network}.nodereal.io/v1/{API-key}
Here is an example:

https://bsc-mainnet.nodereal.io/v1/4c0a1c23661a4e26bcbcwed461e34ea9

For other chains or networks, you could refer to this guidance Find API key & endpoint.

Example

Request

curl https://eth-mainnet.nodereal.io/v1/your-api-key \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"nr_getTransactionByAddressCount","params":[{"category": ["external","20"],"addressType": "from","fromBlock": "0x4","toBlock": "0x615856d7","pageKey": "qg000000-0075-RyKy-efk2-Fx9n32gAu432"}],"id":1}'

Result

{
  "id": "1",
  "jsonrpc": "2.0",
  "result": "0x123"
}