Skip to main content

Don't have an RPC Node yet?

Start using RPC Nodes in your project today.

Get your free RPC Node
Version: 2.2

eth_getNFTBalances

Get NFTs by Wallet Address​

POSThttps://site1.moralis-nodes.com/:chain/:apiKey

Retrieves the list of NFTs owned by a specific wallet address, with options to limit the number of results and paginate through them.

Note

Please refer to RPC schema page for more details on the RPC params and RPC response definitions of the RPC method.

PATH PARAMS
chainstringrequired
The blockchain to interact with.
apiKeystringrequired
Your API key for authentication.
BODY PARAM
jsonrpcstringrequired
JSON-RPC version (typically 2.0).
idnumberrequired
The request identifier.
methodstringrequired
The JSON-RPC method being invoked.
paramsrpcArrayrequired
Parameters for the method, including the wallet address and optional filters.
Responses
// Dependencies to install:
// $ npm install node-fetch --save
// add "type": "module" to package.json

import fetch from 'node-fetch';

const options = {
method: 'POST',
headers: {
accept: 'application/json',
'content-type': 'application/json'
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getNFTBalances"
})
};

fetch('https://site1.moralis-nodes.com/eth/YOUR_API_KEY', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"nfts": [
""
],
"cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"page_size": 10,
"page": ""
}
}