Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Will this wrapper support professional API? Cannot find a way to use my api key #47

Open
ghost opened this issue Sep 23, 2018 · 12 comments

Comments

@ghost
Copy link

ghost commented Sep 23, 2018

The wrapper seems to be working fine without one, but I don't want to get my IP rate limited. In the future I may have to purchase one of the paid api plans to avoid getting limited.

I have looked around and couldn't find where am I supposed to type my api key.

EDIT: I found out why, this wrapper is still using the public API v2. From coinexchange api documentation:

The Public API will be migrating to the new, more powerful Professional API on December 4th, 2018. Please update your application to use the free tier of the Professional API before then.

@ghost ghost changed the title Cannot find how to configure the API key Will this wrapper support professional API? Cannot find a way to use my api key Sep 23, 2018
@alex-stout
Copy link
Contributor

alex-stout commented Oct 9, 2018

I don't think this has been looked into yet. I'll check out what would be needed to make the conversion. As of now, this is not supported.

Edit: I've also opened a pull request that should help with the rate limiting handling... It hasn't been touched in a while though. I gave it a bump today.

@barnumbirr
Copy link
Owner

Ohai,

haven't found the time to update yet, I'll try my best to do so before the deadline.

Cheers.

@dahifi
Copy link

dahifi commented Oct 21, 2018

The API key is the least of our worries. Most of the API calls are different now, and will require different requests and response handlers. I've been messing around with it the last hour, the API key only requires 3 lines of code, but practically everything else in the listings and ticker functions are going to require changes. Haven't even looked at stats yet.

@alex-stout
Copy link
Contributor

@dahifi I'll take some time this weekend to look at refactoring the code for the new calls.

@webventurer
Copy link

CoinMarketCap are discontinuing the v2 API on 04.12.18 btw:
https://coinmarketcap.com/api/

@tmlee
Copy link

tmlee commented Dec 3, 2018

If you guys are looking for a public open API for market data and more, do consider our API at https://www.coingecko.com/api
We designed it to be easy to consume and I think you guys might find it interesting.
Happy to answer any questions or concerns you may have!

@ghost
Copy link
Author

ghost commented Dec 6, 2018

It seems to be working but probably not for long.

@plgonzalezrx8
Copy link

Any idea if this will be updated to be able to use the new APIs? I don't want to lose the functionality of my setup.

Owner, not sure if you are reading this, but will you continue to maintain this library? You are in a very priviledged position of having the default library when doing the pip install coinmarketcap.

@kodycode
Copy link

kodycode commented Dec 28, 2018

I updated the functions to use the new API on my own fork. Right now I have the wrapper using the sandbox API on one branch, but will update it to use the pro version later tonight or tomorrow. See here for the sandbox branch: https://github.com/kodycode/coinmarketcap/tree/sandbox_branch

It requires an api_key parameter to the class if you check out core.py. I don't think I'll be covering the other endpoints but just the main ones.

UPDATE:
Created a pro version: https://github.com/kodycode/coinmarketcap/tree/pro_api_branch.

@barnumbirr I made a PR, let me know if this gets things up to speed.

@xmatthias
Copy link

@kodycode will your pr require changes from a users perspective, or would an existing implementation continue to work as is?

@kodycode
Copy link

@xmatthias Yes, it would require changes from a users perspective. The first change of this updated implementation you would need to supply an api key as one of the arguments for creating the Market class. Not only that, but the functions don't return the same data they used to (see here to see the data returned for the listings function, here for the ticker function, and here for the stats function).

There are also new arguments to feed to the endpoints if so desired. I've documented them in the comments of these functions in my branch, but you may also read them up on the links I posted as well.

@metbril
Copy link

metbril commented Aug 23, 2020

As of 5 March 2020 the public API has been taken down. The module is no longer working. I used this with Home Assistant and its no longer working.

Any chance that the code will be updated to use the pro api? What's the status of merging PR #51 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants