Contract Polygon return wrong number record nft

Contract 0x85CBf58C9d20459339a0b1F586A5FAC643a29286 in Polygon return total: 10000 nft but we can only get total 9999 record
BTW, why we don’t have offset parameter for api /nft/address to get all nft of a contract

you can use that cursor parameter to get all the NFTs, or you mean something else?

https://polygonscan.com/token/0x85CBf58C9d20459339a0b1F586A5FAC643a29286
it says total supply 10000

yes, it says total 10000 but when I get record with limit and cursor, I can only get 9999

ok, I understand now, checking

it looks like the token id 3593 is missing from the results

we will investigate, thanks for reporting

1 Like

BTW, the cursor is not good enough for us when we want to pagination with the table or something similar, The offset with limit is the best for it. Can you guy roll it back

limit should still work for offsets less than 10000

this is fixed now, it returns 10000 token ids

Thanks, is there any info about API to resync metadata of all nft of a contract address

that is work in progress

1 Like

@cryptokid Hi, i run the resync tokenId metadata function for this contract address but it return

 "status": "The metadata could not be updated! Try again later"
}

Could you please tell me why that happen

curl -X 'GET' \
  'https://deep-index.moralis.io/api/v2/nft/0x85CBf58C9d20459339a0b1F586A5FAC643a29286/9998/metadata/resync?chain=eth&flag=uri&mode=sync' \
  -H 'accept: application/json' \
  -H 'X-API-Key: xxx'

I’ll have to look, does it have a valid uri?

I don’t know yet, our client just want to update metadata of all tokenId for this contract. It show correctly in opensea but doesn’t show on your side. So we are trying to figure it out why that happen

It looks like the contract is on polygon and not on eth

ah yes, but the response is still the same
https://deep-index.moralis.io/api/v2/nft/0x85CBf58C9d20459339a0b1F586A5FAC643a29286/9998/metadata/resync?chain=polygon&flag=uri&mode=sync

it looks like the token uri for that smart contract for that token id is invalid, if you get the token uri on chain you get this:

https://opensea.mypinata.cloud\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00/ipfs/QmWDoYGPkWi8uWb35VBiBzEo5jRQuxs58Fz3xtFEb8wr2S
1 Like

tks, let me double-check with our client