Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination issue with API endpoint /v1/validator/eth1/{eth1address} #2687

Open
thinhlu123 opened this issue Nov 13, 2023 · 0 comments
Open

Comments

@thinhlu123
Copy link

thinhlu123 commented Nov 13, 2023

Issue Description:
I've conducted tests on the endpoint, incrementing the offset in 2000 intervals (e.g., 2000, 4000, 6000 etc.), intending to retrieve all public keys with the default limit of 2000 items per API call. Unfortunately, as the offset increases, I consistently receive the same number of data points as the (offset+2000) value. For instance, with an offset of 4000, the response contains 4000 data instead of the expected 2000.

Potential Cause:
I suspect the issue may be linked to the if statement within this function. It seems to set the limit equal to offset + 2000, preventing the API from retrieving all the expected data

cURL example:

curl -X 'GET' \
  'https://beaconcha.in/api/v1/validator/eth1/0xBdD75A97c29294FF805FB2fEe65aBd99492b32A8?offset=6000' \
  -H 'accept: application/json'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@thinhlu123 and others