Regression of BTG
Fuzion24 opened this issue · comments
This is with the old version:
| BTG | 459.35 | 8.35% | 37.47% | 66.87% | 17.00 | 7809.02 |
with the new version:
| BTG | $7.05 | 21.50% | 67.56% | 23.35% | 17.00000000 | $119.77 |
the app was ran about the same time
BTG 's price seems to be wrong in the new version but correct in the old version. I looked through the commit log and didnt see anything that would immediately cause this.
Oh, I see.
I just took a look at the raw JSON coming from CoinMarketCap. Look what's in there now:
{
"id": "bitgem",
"name": "Bitgem",
"symbol": "BTG",
"rank": "682",
"price_usd": "6.85156",
"price_btc": "0.00040833",
"24h_volume_usd": "19457.9",
"market_cap_usd": "408210.0",
"available_supply": "59579.0",
"total_supply": "59579.0",
"max_supply": null,
"percent_change_1h": "-2.73",
"percent_change_24h": "63.82",
"percent_change_7d": "22.36",
"last_updated": "1513784941"
},
Internally, I'm matching the symbol
values in the yml
file with the symbol
values in the CoinMarketCap JSON, and it looks like Bitgem is trampling Bitcoin Gold.
That really sucks. I thought those symbols would be unique.
The obvious solution here is to modify the yml
file to be keyed off of the CoinMarketCap id
rather than symbol
, but I really don't want to have to force users to look up ids in the CoinMarketCap database.
I'll have to think about how to best solve this.
Oh, and regarding the old and new versions:
The older versions of cdash
only queried the top 100 coins from CoinMarketCap. Newer versions query everything. So, you weren't getting this error in the older version because your client would never have received the offending JSON.
Hey, I have the same problem with ICN - I want Iconomi, but I'm getting iCoin 😞.
I really don't want to have to force users to look up ids
I don't think you have to. What if you gave the users an option to provide an id
key instead of symbol
just in some cases? For example:
- symbol : XMR
holdings : 1.23
- id : iconomi
holdings : 1000.0
@angelikatyborska, yeah, I think this is a good idea. I'll take a whack at implementing this over the weekend.
@angelikatyborska, your suggestion worked nicely. Thanks.
This is implemented in v1.3.0
:
https://github.com/chrisallenlane/cdash/releases/tag/v1.3.0
I also added a --name
flag that shows the full name of each currency, rather than the symbol only. This could be useful, for example, if you want to track both Iconomi and iCoin, and need to see which is which in the output.
Closing as resolved.