Skip to content
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

Bug] Crypto/OV/HM - limit of 50 returns Error: cannot convert float NaN to integer #2220

Closed
deeleeramone opened this issue Aug 1, 2022 · 7 comments · Fixed by #2243
Closed
Labels
bug Fix bug crypto Crypto related

Comments

@deeleeramone
Copy link
Contributor

When the limit touches 50, this error message displays.

 /crypto/ov/ $ hm stablecoins -l 50
Error: cannot convert float NaN to integer

When a category is selected, the % of market cap should then be calculated as relative to the % of the chosen category, and not the entire market cap of all cryptos. This is why everything is crowded into one tiny corner while the biggest pieces are fractions of one percent.

Screen Shot 2022-07-31 at 8 04 59 PM

Screen Shot 2022-07-31 at 8 06 41 PM

@github-actions github-actions bot added bug Fix bug crypto Crypto related labels Aug 1, 2022
@deeleeramone
Copy link
Contributor Author

The help dialogue indicates this is ranked by market cap, but this is clearly not the % of BTC's market cap. There is nowhere to indicate what this value is, why it's there, and what it has to do with the % of total market cap.

Screen Shot 2022-07-31 at 8 14 47 PM

@soggyomelette
Copy link
Contributor

@deeleeramone the % here represents the daily percentage change in the currency - I've updated the help for the hm command to say the same, hopefully that helps?

colin99d added a commit that referenced this issue Aug 3, 2022
@deeleeramone
Copy link
Contributor Author

deeleeramone commented Aug 3, 2022

@soggyomelette One would eventually make that logical leap as a conclusion, but knowing the % change from today does little to help situations such as the screenshot above, the Top 20/40 Stable Coins. Ranking stable coins by a market cap value relative to the entire market makes all stable coins = 0% by the time you introduce rounding. This is why the large majority of coins are right on top of each other and is unreadable.

@soggyomelette
Copy link
Contributor

@soggyomelette One would eventually make that logical leap as a conclusion, but knowing the % change from today does little to help situations such as the screenshot above, the Top 20/40 Stable Coins. Ranking stable coins by a market cap value relative to the entire market makes all stable coins = 0% by the time you introduce rounding. This is why the large majority of coins are right on top of each other and is unreadable.

It's just that looking at other heatmaps online (like this one https://www.tradingview.com/heatmap/stock/?color=change&dataset=SPX500&group=sector&size=market_cap_basic) I saw they used the percentage in the center to denote the same thing so I thought I would leave it unchanged.

Also, looking at the code, it does in fact rank them relative to the category you choose but the market cap of some of the later stable coins is so minute that they get dwarfed by the much larger stable coins (https://www.coingecko.com/en/categories/stablecoins? for example check the market of $65B of USDT with even the 20th coin with $108M - it's almost a 1000x less

@deeleeramone
Copy link
Contributor Author

I suppose the issue is in the clarity of the purpose for the function, and communicating that to the user. The text is also insanely small. Is there a way to auto-scale the size of the text?

Screen Shot 2022-08-07 at 4 08 08 PM

@soggyomelette
Copy link
Contributor

Regarding the clarity, that's why I updated the help to reflect the fact that the percentage denoted is the daily percentage change, is there something else that can be changed to make it clearer to the user?

Also, I had a go at scaling text sizes and here's what it looks like:
image

I think it's definitely better since there's no more crowding in the corners

@deeleeramone
Copy link
Contributor Author

Nicely done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug crypto Crypto related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants