LesterCovax / crypto-sheets

Google Sheets script editor code for managing a cryptocurrency tracking spreadsheet
https://www.reddit.com/r/cryptosheets
GNU General Public License v3.0
482 stars 67 forks source link

EMC2 returns an error #15

Closed ddarbs closed 6 years ago

ddarbs commented 6 years ago

line90: while (coins[n]['symbol'] !== myCoins[i]) {

TypeError: Cannot read property "symbol" from undefined. (line 90, file "Code")

ddarbs commented 6 years ago

This is because of coinmarketcap not grabbing certain coins in the pull.

Project-42 commented 6 years ago

Hmm.. looks like you will need to do an exception and setup a call for that one with its coinmarket ID:

https://api.coinmarketcap.com/v1/ticker/Einsteinium/

Let me see if there is a way to make sure we get all the coinmarketcap coins

Project-42 commented 6 years ago

Ok, I think this is working:

https://api.coinmarketcap.com/v1/ticker/?start=1&limit=1000

Let me check with the gurus later if we can add that way so we dont miss any coin. And please, report any other issue you can find so we get it fixed :)

I checked using https://api.coinmarketcap.com/v1/ticker/?start=1&limit=10000 and looks like the total of coins is 1372

ddarbs commented 6 years ago

Thanks! 1372 might have been how many they support when you queried the api. It is showing 1381 for me, so might be good to set a limit of 1500 for now.

Project-42 commented 6 years ago

No need. The code includes "no limit" now https://api.coinmarketcap.com/v1/ticker/?convert=' + targetCurrency + '&limit=0?';

ddarbs commented 6 years ago

Awesome. Need to remove the ? after limit=0 or it will still break on EMC2.