-
Notifications
You must be signed in to change notification settings - Fork 162
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
Get Spot Account Record
pagination by idLessThan
doesn't work
#51
Comments
@antipainK Hi, The usage of |
The parameter name itself is misleading.
Let me show you my example: # start_time = 1704672000000, end_time = 1704758400000
params_01 = {"startTime": start_time, "endTime": end_time}
batch_01 = await bitget.private_tax_get_v2_tax_spot_record(params_01)
ids_01 = [entry.get("id") for entry in batch_01["data"]]
assert len(ids_01) == 500
params_02 = {"startTime": start_time, "endTime": end_time, "limit": 250}
batch_02 = await bitget.private_tax_get_v2_tax_spot_record(params_02)
ids_02 = [entry.get("id") for entry in batch_02["data"]]
for i in range(250):
assert ids_01[i] == ids_02[i]
params_03 = {"startTime": start_time, "endTime": end_time, "limit": 250, "idLessThan": ids_02[-1]}
batch_03 = await bitget.private_tax_get_v2_tax_spot_record(params_03)
ids_03 = [entry.get("id") for entry in batch_03["data"]]
for i in range(250):
assert ids_01[250 + i] == ids_03[i] This test fails at the last assert. The actual length of |
@BitgetLimited Could you give me an update on this topic? It's quite a serious problem. |
I confirm, we have a similar issue an it's critical |
Hi, I've encountered the same issue. Some transactions are missing when there are lots with the same timestamp. Here's an example: data = api.send(:get, '/api/v2/tax/spot-record', startTime: 1689589112000, endTime: 1692181112000, limit: 150)
data1 = api.send(:get, '/api/v2/tax/spot-record', startTime: 1689589112000, endTime: 1692181112000, limit: 75)
data2 = api.send(:get, '/api/v2/tax/spot-record', startTime: 1689589112000, endTime: 1692181112000, limit: 75, id
LessThan: data1['data'][-1]['id'])
data['data'].size # 129
data1['data'].size # 75
data2['data'].size # 40
(data['data'] - data1['data'] - data2['data']).pluck('ts')
# ["1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270"]
data1['data'].dig(-1, 'ts') # 1690994567270 When transactions with the same timestamp are split into pages, the transactions with that timestamp are missing from the second page. |
data = api.send(:get, '/api/v2/tax/spot-record', startTime: 1689589112000, endTime: 1692181112000, limit: 150) data['data'].size # 129 (data['data'] - data1['data'] - data2['data']).pluck('ts') ["1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270", "1690994567270"]data1['data'].dig(-1, 'ts') # 1690994567270**** |
|
J |
I'm trying to implement this endpoint:
https://www.bitget.com/api-doc/common/tax/Get-Spot-Account-Record
My test case:
iddLessThan
you get only 5 entriesIt doesn't really matter which of the 10 entries id you choose, you won't get those original 20 entries by pagination with
idLessThan
.I can't use this endpoint without this pagination, because we have more than the page limit with the exact same timestamp (more than 500 entries at the exact same time).
The text was updated successfully, but these errors were encountered: