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

Data download is completely broken by CMC's v1 API Deprecation #86

Open
1 of 4 tasks
ddm-j opened this issue May 27, 2024 · 6 comments
Open
1 of 4 tasks

Data download is completely broken by CMC's v1 API Deprecation #86

ddm-j opened this issue May 27, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@ddm-j
Copy link

ddm-j commented May 27, 2024

This is a(n):

  • New feature
  • Update to an existing feature
  • Error
  • Proposal to the Repository

Details:
CoinMarketCap (CMC) seems to have recently deprecated some of their V1 endpoints, which this library depends on.

In utils.py we have the core downloading logic accessing the following endpoints:

    if id_number:
        api_url = "https://web-api.coinmarketcap.com/v1/cryptocurrency/ohlcv/historical?convert={}&id={}&time_end={}&time_start={}".format(
            fiat, id_number, end_date_timestamp, start_date_timestamp
        )
    else:
        api_url = "https://web-api.coinmarketcap.com/v1/cryptocurrency/ohlcv/historical?convert={}&slug={}&time_end={}&time_start={}".format(
            fiat, coin_id, end_date_timestamp, start_date_timestamp
        )

CMC now requires an API key for this, and gives a different response than the code downstream in core.py's _download_data method expects:

Error message (download_data) : Expecting value: line 1 column 1 (char 0)

Unless I'm completely wrong, CMC's API change may make this library completely obsolete, which is sad.

@RodryGonzalez
Copy link

Found same error

@lauchunlok
Copy link

lauchunlok commented May 28, 2024

Found same error too
web-api is gone

EDIT:
Data can still be accessed via https://api.coinmarketcap.com/data-api/v3/cryptocurrency/historical?id=1&convertId=2781&timeStart=1633910400&timeEnd=1639180800

But couldn't find the map endpoint to get the id to get the data

@q24wang
Copy link

q24wang commented May 28, 2024

yes same issue

@guptarohit guptarohit pinned this issue May 28, 2024
@guptarohit guptarohit added the bug Something isn't working label May 28, 2024
@Sebasfac
Copy link

same issue here

@ddm-j
Copy link
Author

ddm-j commented May 29, 2024

Found same error too
web-api is gone

EDIT:
Data can still be accessed via https://api.coinmarketcap.com/data-api/v3/cryptocurrency/historical?id=1&convertId=2781&timeStart=1633910400&timeEnd=1639180800

But couldn't find the map endpoint to get the id to get the data

I think you can get the map endpoint with a basic (free) API key. My code relies on it currently.

Where did you find the docs for this endpoint you've referenced?

@lauchunlok
Copy link

Found same error too
web-api is gone
EDIT:
Data can still be accessed via https://api.coinmarketcap.com/data-api/v3/cryptocurrency/historical?id=1&convertId=2781&timeStart=1633910400&timeEnd=1639180800
But couldn't find the map endpoint to get the id to get the data

I think you can get the map endpoint with a basic (free) API key. My code relies on it currently.

Where did you find the docs for this endpoint you've referenced?

Yes you're right and I think for this package to work it would need an endpoint without API key.
I don't think there is one. I found that in a reply in StackOverflow and it happened to be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants