/nft/{address}/owners missing some token id's

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.

do you happen to have the list of missing tokens?

can you try with getAllTokenIds endpoint? the one without owners

it could be related to a pagination issue that we are working on fixing it

Hey cryptokid,

Thanks for the super quick reply. Here are the missing tokens

[161, 193, 227, 300, 320, 346, 366, 372, 374, 398, 468, 478, 656, 666, 667, 706, 718, 724, 739, 811, 857, 898, 907, 910, 937, 973, 1002, 1019, 1027, 1063, 1072, 1116, 1135, 1171, 1181, 1222, 1327, 1450, 1486, 1487, 1578, 1586, 1619, 1717, 1766, 1781, 1791, 1815, 1862, 1863, 1916, 1936, 1976, 1995, 2044, 2115, 2124, 2140, 2146, 2158, 2161, 2169, 2173, 2194, 2223, 2247, 2289, 2354, 2425, 2428, 2508, 2532, 2618, 2740, 2796, 2800, 2802, 2833, 3030, 3066, 3067, 3094, 3101, 3173, 3193, 3284, 3344, 3365, 3428, 3431, 3515, 3524, 3551, 3672, 3711, 3724, 3825, 3914, 4040, 4059, 4090, 4097, 4104, 4106, 4132, 4146, 4149, 4209, 4210, 4239, 4279, 4369, 4468, 4493, 4508, 4633, 4705, 4721, 4734, 4758, 4760, 4802, 4818, 4829, 4839, 4968, 4994, 5092, 5164, 5178, 5220, 5230, 5232, 5237, 5332, 5347, 5375, 5381, 5386, 5387, 5395, 5398, 5405, 5435, 5451, 5515, 5518, 5546, 5562, 5686, 5693, 5723, 5738, 5777, 5792, 5822, 5988, 6032, 6055, 6067, 6098, 6108, 6163, 6164, 6257, 6259, 6296, 6298, 6320, 6521, 6623, 6634, 6706, 6827, 6843, 6863, 7043, 7051, 7055, 7087, 7118, 7186, 7196, 7516, 7530, 7615, 7664, 7743, 7756]

It appears random

I tried it with the getalltokenIds, it works fine, but i noticed i’m getting a total of 7796 results. I’m not sure why it’s higher than my collection count of 7,777

image

maybe there are some duplicates there

Alright. Is there a timeline for the fix on the pagination issue for the /owners endpoint?

I don’t have an exact ETA now

Yeah would appreciate if there’s some timeline esp since my team is paying for this service. Is there any way we can speed up this process?

we are working on fixing it

it could be a week, it could be days, I don’t know exactly