Round top for >100B

This commit is contained in:
scoobybejesus 2018-01-04 10:00:15 -05:00 committed by GitHub
parent b0a5d039ec
commit c5035e6b38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -383,7 +383,10 @@ def top(bot, trigger):
price_btc = float(i['price_btc'])
market_cap_usd = float(i['market_cap_usd'])
if market_cap_usd >= 1000000000:
if market_cap_usd >= 100000000000:
market_cap_short = int(int(round(market_cap_usd,-9))/int(1000000000))
else:
market_cap_short = float(int(round(market_cap_usd,-8))/int(1000000000))
rounded_mcap = str(market_cap_short)+"B"
else:
rounded_mcap = "tiny"