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

Coinbase deprecated some endpoints, breaking the CB plugin #216

Open
eprbell opened this issue Dec 14, 2023 · 5 comments
Open

Coinbase deprecated some endpoints, breaking the CB plugin #216

eprbell opened this issue Dec 14, 2023 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@eprbell
Copy link
Owner

eprbell commented Dec 14, 2023

On Nov 30 2023 Coinbase deprecated the Buys and Sells endpoints in the v2 API: https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-buys

These endpoints were used by the DaLI Coinbase plugin: their deprecation broke it. Now when running the plugin the following error occurs:
Error <Response [410]>: This API has been deprecated. Please use the Transactions API (https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#list-transactions) to view your past transactions.

The Buys and Sells endpoints were used by the plugin to get fee information for fill transactions. At first glance it doesn't seem the list-transactions endpoint (mentioned in the error message) returns fee information, but more investigation is needed.

If fee information is not available from list-transactions we may need to:

  • migrate the plugin to the v3 REST API (which implies rewriting a good part of the plugin), or
  • reimplement the plugin as a AbstractCcxtInputPlugin subclass (also a rewrite but at least it would inherit a lot of functionality from the superclasses).
@eprbell eprbell added the help wanted Extra attention is needed label Dec 14, 2023
@ndopencode
Copy link
Contributor

ndopencode commented Apr 8, 2024

Coinbase has further deprecated fields within the list/show transactions endpoints on 2024-02-07 such as the _DETAILS: str = "details" field. See for further information: https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#parameters

@imbobbb
Copy link

imbobbb commented Apr 19, 2024

first time user here. awesome project btw. @eprbell in terms of fee information, adding the new_version_opt_in=true parameter seems to fetch fee information. so "/v2/accounts/{account_id}/transactions?new_version_opt_in=true" should work. I tried to make changes, but as @ndopencode mentioned, coinbase has deprecated other fields too and I don't have a lot of transactions to test every transaction type.

@eprbell
Copy link
Owner Author

eprbell commented Apr 19, 2024

first time user here. awesome project btw. @eprbell in terms of fee information, adding the new_version_opt_in=true parameter seems to fetch fee information. so "/v2/accounts/{account_id}/transactions?new_version_opt_in=true" should work. I tried to make changes, but as @ndopencode mentioned, coinbase has deprecated other fields too and I don't have a lot of transactions to test every transaction type.

Interesting info: thanks for sharing it! Unfortunately right now I don't have a lot of time to look into it, but if anybody else wants to submit a PR I'll happily review the code.

@rapus95
Copy link

rapus95 commented Jun 24, 2024

I wonder if the endpoint described in https://docs.cdp.coinbase.com/exchange/reference/exchangerestapi_postreports might offer a hassle-free implementation by just kicking off a csv-report-generation for all required data and telling the user to rerun the script later, which then checks for the ready state. And if it's ready, the endpoints will provide csv files to be downloaded and parsed. My expectation would be that it might be less cumbersome to reorganize multiple csv's rather than juggling multiple api endpoints.

Edit: in particular, since the code for reorganization of the csv could also be used to parse manually downloaded csv's.

Edit2: They now also have an official python sdk: https://github.com/coinbase/coinbase-advanced-py

@eprbell
Copy link
Owner Author

eprbell commented Jun 25, 2024

Thanks for the links: I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants