I used to get nft transfers from the deep index API /nft/{address}/transfers in order by block_number.ASC.
Lately I noticed that the transfers are not in order anymore. Checking the swagger-ui documentation, I noticed the order parameter is gone. What is happening?
yes, the order parameter was disabled few days ago for performance reasons
Hi,
I am using the same endpoint. I have solved the problem on my end, when I receive all the transactions I can order them by block number or date created. Because I need the transactions in the order as they have been created on the chain.
The problem starts when I check the endpoint the next day again and see that there are new transactions. How can I just receive those new transactions? How I did it before: order by block number and transaction index, and use the offset parameter.
I have also read on another thread that you are ordering the data internally now. Is it possible that you order transactions by block number and transactions index immediately? I am sure that most of us will need only this kind of order by.
Hey,
this is really important to us as well, we have to postpone our launch now until this is fixed OR we could have an alternative?
By what is it sorted now and is it possible to get it sorted by something like time/ order…!?
we are working on adding a sort method that should solve your problem, I don’t know the exact ETA now
could you at least make a quick fix for the /nft/{address}/transfers and /erc20/{address}/transfers endpoints and sort the results by block number and transaction index? That’s what everybody needs.
would be nice to know if this can be done fast. Otherwise I will be forced to switch Moralis since my app is down for several days.
3 Answers. A properly written application will find a given query parameter in any order and will not be order sensitive. It is possible though to have poorly written parsing code that would only find a given parameter at the beginning, at the end, or only if after some other parameter.
I have a user with 120k transactions. What you suggest is to query all 120k transactions every time to find the new transactions which happened since my last check?
@Summey:
a properly written api will not change without marking an endpoint as deprecated or inform the users upfront since they are running their business with those apis…
I found out by what it is sorted now: by transaction hash, that means random, we’ll see what we can do regarding to that order
Great, just try to make it sorted by both, block_number and transaction_index. Since one block can have several transactions. If you don’t put the transaction_index to the ordering, then the transactions with the same block number will be random.
Do you have any info about when we can plan to see the endpoint work again?
we hope to have a solution this week
is the solution for free users too ? or for paid user only ?
the solution will be available for everyone
@dagr, @sharpcrypto, @khalil, @Summey, @thealexsachs, can you check now how it works? we added a new order and also pagination with cursor for some endpoints
I still see the offset. Should we use the cursor or the offset? Does the offset works alone without the cursor?
I tested with cursor and offset, at the same time
thanks. it is working. but im using offset instead of cursor.
speed is still the same right between cursor and offset ?
Yea if you go page by page using offset without jumping it’s same
If you use offset and jump a lot - it will be slower