-
Notifications
You must be signed in to change notification settings - Fork 121
Description
Is your feature request related to a problem? Please describe.
The current pagination with limit and offset is causing issues when dealing with live blockchain data. Since new blocks are constantly being added, the pages keep shifting around between requests, which means we can end up missing transactions or getting duplicates when paginating through results.
Describe the solution you'd like
I'd like to see block-based filtering added (similar to how Ethereum handles this) with fromBlock and toBlock parameters. This way we can query data from a specific block range that won't change while we're paginating through it.
Could we start by adding these parameters to the contract events endpoint: https://api.mainnet.hiro.so/extended/v1/contract/{contract_id}/events?
If it works well there, we could roll it out to other endpoints that have similar pagination issues.
I am opening this issue to start the discussion on this