It appears that there are certain tokens being missed out when I run the iteration on the contract 0x809d8f2b12454fc07408d2479cf6dc701ecd5a9f. Below is my code.
output_data = {}
headers = { 'accept': 'application/json', 'X-API-Key': api_key}
cursor = ''
print('Calling onto moralis API')
while(True):
data = requests.get(f'https://deep-index.moralis.io/api/v2/nft/{contract_address}/owners?cursor={cursor}&chain=eth&format=decimal', headers=headers)
response = json.loads(data.text)
cursor = response['cursor']
print(cursor)
for result in response['result']:
output_data[int(result['token_id'])] = result['owner_of']
if len(cursor) == 0:
break
missed_out = [x for x in range(1,7778) if x not in output_data.keys()]
I’m getting at least 20 missed out numbers.