website logo
Join the CommunityContact Us
Navigate through spaces
⌘K
Palm Network Developer Portal
The Palm Network
Submit an Article
Network Details
Validators
Get Started
Get PALM Tokens
Gas Fees
Connect to Palm network
Run a Transaction Node
How To Tutorials
MetaMask Wallet Setup
Deploy NFT Contracts
Verifying NFT Contracts
Mint NFTs with Hardhat
Bridge
Use the Bridge
Integrate With the Bridge
Bridge Component Addresses
Deprecated
Use Supported Tools
Block Explorer
Moralis
Palm Safe
The Graph
Covalent API
Docs powered by archbee 

Get Owners by Contract

4min

GET owners of NFTs for a given contract.

  • Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection.

Query Params

Description

chain

The chain to query

address (required)

The address of the wallet



index.js
index.ts
Success Response
|
import Moralis from "moralis";
import {
  EvmChain,
  GetNFTOwnersResponseAdapter,
} from "@moralisweb3/common-evm-utils";
import { config } from "dotenv";

// Inject environment variables
config();

const runApp = async () => {
  await Moralis.start({
    apiKey: process.env.MORALIS_API_KEY,
    // ...and any other configuration
  });

  const address: string = "0xCAFFA4b5F72a44C75F796E94F22dEBd6369F04FC";

  const chain: EvmChain = EvmChain.PALM;

  const response: GetNFTOwnersResponseAdapter =
    await Moralis.EvmApi.nft.getNFTOwners({
      address,
      chain,
    });

  console.log(response.toJSON());
};

runApp();



💡 Learn More

  • API Reference
  • NFT-Gating DApp
  • Portfolio Dashboard



Updated 03 Mar 2023
Did this page help you?
Yes
No
PREVIOUS
Get Transfers by Contract
NEXT
Palm Safe
Docs powered by archbee 
TABLE OF CONTENTS
💡 Learn More