-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
coinbase advanced; fetch_accounts_v3 pagination doesn't work #22780
Comments
The pagination works for me, I used coinbase.py. Would you like to paste logs here? |
sure, no problem, I just striped the private data: this is the log, with logging enabled
and this is the error message I get, when the account could not be found:
maybe also interesting, this is the way how I initialize the client:
|
@joergkiesewetter Coinbase requires an account ID to fetch deposits, and each account represents a currency. If you get that error, it probably means you don't have an account ID for that currency, but you can debug it by doing so. await coinbase.load_accounts()
print(coinbase.accounts) can you check if for instance endpoint used: https://docs.cdp.coinbase.com/sign-in-with-coinbase/docs/api-deposits/#list-deposits |
@carlosmiei indeed, ALGD is not in the list of accounts. When I just execute your command, I get a list of 100 accounts associated to my cb-account. So, when I enable pagination, I get a list of 1,000 accounts, but each account is in there 10 times, like:
all look exactly the same (id, uuid, retail_portfolio_id stripped), with the same ids, only the curser is different every time |
@carlosmiei any new insights here? |
figured it out. Before you make calls for coinbase advanced, you should make a dedicated call to
In this way you can make sure, that the accounts are loaded paginated. If not, this will be done internally without pagination. |
Operating System
mac
Programming Languages
Python
CCXT Version
4.3.42
Description
I want to collect all deposits and withdrawals of my coinbase advanced account. This works for some of them, but for some I get an error:
The reason for this is quite simple. In
ccxt/coinbase.py:prepare_account_request_with_currency_code
we try to find an account id based on thecode
(line 2557). The called functionfind_account_id
loads all the accounts and tries to find the right account to the given market code.While loading all accounts, we do paginated requests to load all of them, but here is the problem. The first request is fine, but the second request is not fine. Even giving in the correct cursor, the response is the same as in the first requests. Means, we query the same accounts 10x and the cursor is not working.
This comes form
ccxt/base/exchange.py:fetch_paginated_call_cursor:5590
.Hopefully, this makes sense.
Code
The text was updated successfully, but these errors were encountered: