Pagination issue with API endpoint /v1/validator/eth1/{eth1address}
thinhlu123 opened this issue · comments
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'