I am running into a weird problem with List Accounts that I am hoping to track down.
Note that the authorizing user can select a wallet, and one of the options is BTC:
Next, select a non-BTC wallet. In this case, I select BSV:
Getting the access token from authorized user, I run:
curl https://api.coinbase.com/v2/accounts -H "CB-VERSION: 2022-05-22" -H "Authorization: Bearer <access_token>"
This is where it gets weird. Note the results:
"name": "ETC Wallet",
"name": "Ethereum Classic",
Note that there are 203 returned records. This means all the records for the account, correct? And since there is no paging information, the returned result set is supposed to be 203 records? When counting all items, it seems that only 201 records are returned.
Note further that ETC is the first account returned when according to this answer, it should be BSV since it was the selected wallet in the authorization screen, correct?
As mentioned, there are actually only 201 items in the data in the result set. The BTC wallet shown earlier (and ETH) wallets are not listed/found in the results. In fact, none of the listed options of authorized wallet access are returned.
Any clarification/assistance that anyone can lend towards addressing these points of confusion would be greatly appreciated.
Hello @Mike-E! Thank you for taking an interest in trying out Coinbase APIs. For the details regarding your concern, we will check on this for you with our team. We will get back to you once we have more information. Keep in touch!
Note that this problem seems to go away if I request
account=all. I get 207 returned accounts rather than 203, and BTC/ETH are among them. So it would seem this is a bug when
account=select (the default value)
Hello @Mike-E! Thank you for reaching out to us. To make sure that we are on the same page, we would like to confirm the following:
- Are you asking why you are getting a result of 203 records and 201 records without the pagination when running the List Accounts using the access token?
- Are you asking if why the returned data of the List accounts includes unauthorized wallets after calling the List Accounts with the access token?
You also mentioned that when trying to call the list accounts, you were not able to receive the BSV wallet that the user authorized. Are you experiencing this issue only with the BSV wallet?
Hi @HakunaMatata thank you for your patience here as I attempt to explain this issue, which is indeed nontrivial.
Note that this only occurs when using an access token created from the
https://www.coinbase.com/oauth/authorize endpoint when
account=select (default value). An access token created with the
account=all appears to grab all accounts/wallets as expected.
To answer your questions (hopefully ):
- When using an
account=select access token the JSON results feature a
limit:203 but if I actually count all returned elements, there are 201. Additionally, important non-selected wallets such as BTC/ETH are missing.
- No. I do appreciate your patience again as I attempt to explain this complex issue. It simply appears that the data returned does not match the described data in its own response. The JSON response declares a limit of 203 (which I interpret as the total expected count in the result list), but the actual results are 201.
Finally, as for BSV, please disregard this as I have not seen this since reporting it. When selecting a wallet that appears to work as expected now and I have not been able to reproduce this problem. I will continue to monitor it for you, however.
Please do let me know if there are any further questions I can answer or information that I can provide to further track down this issue for you.