nr_getNFTHoldersWithBalance

This API method helps you to get the owners with balance for a BEP-721/1155 tokenId.

📘

Supported on BSC and ETH mainnet only.

Parameters

  • Contract Address - The address of the contract
  • Token Id - The tokenId in hex format of the BEP-721/1155 token

Returns

  • items - A string representing addresses of the owners(if owners length > 30000, only return at most 30000 records)
    • ownerInfo - string
    • balance - string

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://bsc-mainnet.nodereal.io/v1/your-api-key \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nr_getNFTHoldersWithBalance","params":["0x64aF96778bA83b7d4509123146E2B3b07F7deF52","0x5000004"],"id": 1 }'

Result

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