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
475 stars 70 forks source link

BTM Bytom/Bitmark Mixup #18

Closed ddarbs closed 6 years ago

ddarbs commented 6 years ago

Symbol BTM returns coin Bytom, but I am looking to return BTM Bitmark.

Project-42 commented 6 years ago

Please, paste your code and the coins you want to "get" so we can check

ddarbs commented 6 years ago

Formatting messing up when I try to post here. https://pastebin.com/WEkwT8p5

BTM I am trying to get Bitmark, not Bytom.

Project-42 commented 6 years ago

https://api.coinmarketcap.com/v1/ticker/?&limit=0

Can you check (sorry my mobile can't do the search for the whole list) if they actually have same symbol? (BTM)

Project-42 commented 6 years ago

If that is the case, will need to add new function and ask for the name or id instead of the symbol

ddarbs commented 6 years ago

No worries, yes they both have the symbol BTM, but Bytom is a higher rank than Bitmark.

Project-42 commented 6 years ago

We had the code to search for "id" before, but adding the coin symbol was easier and friendly..

We may need to go back to id or check for other options

ddarbs commented 6 years ago

Would it be easier to add a part for exceptions? if the id = ___ then skip it until the next instance of the symbol type thing.

Project-42 commented 6 years ago

I think that will make things more complex.

"id" should be unique, so I think will be a good idea to use it

Can't imagine the confusion in the exchanges with that...

ddarbs commented 6 years ago

True. Changing to using 'id' and changing the symbols to ids worked.

LesterCovax commented 6 years ago

Weird, good catch. I thought symbols were unique as well. That's an oversight on my part. I changed it to symbols because it's more of a pain for people to look through the api list to find the correct ID. I think we may just need to provide a list that's updated periodically with the name, id, and symbol of the coins in the API.