NULL result on “total” for getNFTTransfers (v1)

This code is still running in v1 as a Cloud Function and totalNum is always NULL (for Polygon as well as Ethereum).
There have been bugs related to that API in the past, which got fixed quickly. Hope this time as well :slight_smile:

Thanks for your help in advance !

  const optionsPolygon2 = { chain: "polygon", direction: "to", address: userAddress };
  let transfersNFTPolygon = await Moralis.Web3API.account.getNFTTransfers(optionsPolygon2);
  totalNum = transfersNFTPolygon.total;

You have to set disable_total parameter to false if you want to get that total in response

Thanks so much - that fixed the issue !

Do I need to add disable_total also to this API call ?
Moralis.Web3API.account.getNFTsForContract(options);

You can do it if you want to also get the total value

1 Like