EthNFTOwners Database query yields less results than Web3API

Hello, I’m trying to get all the NFTs owned by a specific account.

The following code

    const NFTModel = Moralis.Object.extend("EthNFTOwners")
    const query = new Moralis.Query(NFTModel)
    query.limit(10000)
    query.equalTo("owner_of", walletAddress)
    console.log(await query.count())

returns 536 results, but the dedicated Web3 API returns 773 results (the latter bein the correct value).
I’ve also updated the server, no improvements.

Am I misunderstanding something? Can somebody help?:disappointed:
Thank you

I wasn’t accounting for owning multiple ERC1155 tokens, but the problem still persists:

  const NFTModel = Moralis.Object.extend("EthNFTOwners")
  const query = new Moralis.Query(NFTModel)
  query.limit(10000)
  query.equalTo("owner_of", address)
  const res = await query.find()
  let count = 0
  for (let x of res) {
    //@ts-ignore
    count += parseInt(x.get("amount"))
  }
  console.log(count)

Returns a way off number (536) vs calling

 const response = await Moralis.Web3API.account.getNFTs({
        chain: "eth",
        address: walletAddress,
        offset: offset,
      })
      console.log(response.total)

which returns over 700!!

Isn’t the EthNFTOwners collection equivalent to the web3API request? What am I missing?

you are testing with a single address there? can you try to add that address to watch in admin interface?

Hi,
I am using the same address, and this address is in my WatchedEthAddress (added with the following code).

Moralis.Cloud.run(
      "watchEthAddress",
      {
        address: walletAddr,
        sync_historical: true,
      },
      { useMasterKey: true },
    )

EDIT: removed the part where I wasnt able to stop an address from being watched. Not sure what happened but feels like a some mistake by my part or the Dashboard not updating. Restarted the server and could query properly. The above issue still remains tho.

Ok, can you also paste your server subdomain/url?
I’ll look later today

Sure,
https://gn6uzbbxlme3.usemoralis.com:2053/server
I picked a random wallet address that had a couple hundred NFTs to experiment with: 0xbd9d1d31a6a451f7a8ec61fc5fd491fd59d5f489

Database query yields 547 today vs 784 from Web3API

Thank you, lemme know if i can provide some other info

I don’t know exactly what is happening, in the new nitro version, EthNFTOwners will no longer be present: Moralis Nitro Beta Testing

what?! this is very very very bad news for me actually, given Web3API is rate limited… Hopefully rate limits will be increased significantly, at least for paid plans.