-
Notifications
You must be signed in to change notification settings - Fork 67
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
Upgrade to use Coinmarketcap v2 API instead of v1 (EOL is Nov '18 for v1) #47
Comments
May I suggest considering our API endpoints https://www.coingecko.com/api/docs/v3 from https://www.coingecko.com/en There are already quite a number of services deploying our API. For this use case, may I suggest the Do let me know if this helps solve some of the problem you guys are facing. |
Thanks @tmlee , looks good at first glance and I'll have to take a deeper look at it. I'm not opposed to switching API sources and I think users have even requested in the past to provide access to different API points. Pretty cool after having received so many Coingecko moon report emails to have you drop by 😀 |
@LesterCovax Awesome, hope you are liking the moon reports :) |
@tmlee Hoping to make the switch to Coingecko over the weekend or early next week. The procrastination cannon has now reached full power! |
I tried using Coingecko but unfortunately, they do not have 1H and 7D percentage changes for coins. Unfortunately, I get the 'TypeError: Cannot read property' for whatever datatype I try to use for myCoins and myCoinsCount. |
Thanks for the information. Unfortunately, my skills on the matter are quite limited and it's getting late but I'll give it another shot at a later stage. |
Looks like I am almost there! The only problem is that when using https://api.coingecko.com/api/v3/coins Unfortunately, this still would not solve everything since the results are capped and not all coins are shown. |
There are examples of this at the bottom of the Crypto Sheets script (LINK). I'd recommend installing a JSON viewer browser extension, or at least put it into an IDE or text editor that can pretty-print it for you. |
I taught myself javascript and re-wrote a bunch of code for my own purpose. It uses the v2 API, so that's working now. I also moved the variable inputs to a separate sheet called parameters so you don't need to go into the script at all. In the parameters sheet, you can punch in your currency, CoinMarketCap API Key, ethplorer.io API key (freekey works for now), and ETH and NEO wallet addresses. I haven't modified the code for any other cryptocurrencies since I only hold significant amount of ETH and NEO tokens. I also upgraded the code so it pulls in all your token balances on both blockchains into the Wallets sheet. The rates it pulls into the Rates sheet is based on the coin symbols column in a new Portfolios sheet. I have no idea how to use Github. What's the best way to share my code?? |
@brian911 will you send it to me? |
Here you go. I stripped the Google Sheets of personal data. You'll need to input a CoinMarketCap API for the script to run. There's a menu called crypto-sheets which you can use to reload the data. https://docs.google.com/spreadsheets/d/1BdkCozOI7jGPtXs9o0z_1vmFzrcCwdWnHrTAeYVKSQE/edit?usp=sharing |
thanks man
…On Tue, Apr 2, 2019 at 8:44 PM brian911 ***@***.***> wrote:
Here you go. I stripped the Google Sheets of personal data. You'll need to
input a CoinMarketCap API for the script to run. There's a menu called
crypto-sheets which you can use to reload the data.
https://docs.google.com/spreadsheets/d/1BdkCozOI7jGPtXs9o0z_1vmFzrcCwdWnHrTAeYVKSQE/edit?usp=sharing
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATA9bAGN66oPM8GEmg3TJwcSUIubpjFwks5vdAdvgaJpZM4Vg3rZ>
.
|
Hi @johndoe312, we had to paginate the response data for the API. Would it be possible for you to work with paging through the results? The response header will indicate if there is more page to iterate. Any feedback would be helpful for us to see how we can improve and match your use case |
Thanks. To be honest, in the meantime I found an alternative and have been using that since the issue cropped up. |
source
As brought to my attention by @CharlesChow in #46 , the
v2 API
(Documentation Here) appears to have some major changes, such as curbing the practice of downloading all coin information in one call, as opposed to their preferred method of using pagination and dictionaries/arrays. This will require a bit of work.The text was updated successfully, but these errors were encountered: