vanhbakaa / Cexio-Tap-bot

Python bot for cex.io telegram bot. Cexio bot
https://t.me/cexio_tap_bot?start=1729165832653351
MIT License
90 stars 20 forks source link

Balance Format #7

Closed Visualua closed 2 months ago

Visualua commented 2 months ago

How about adding a format for the balance with a separator for better readability?

                balance_usd = float(data_response['balance_USD'])
                balance_btc = int(data_response['balance_BTC']) / 100000
                balance_cexp = float(data_response['balance_CEXP'])

                self.coin_balance = balance_usd
                logger.info(
                    f"Account name: {data_response['first_name']} - "
                    f"Balance: <yellow>{balance_usd:,.2f}</yellow> - "
                    f"Btc balance: <green>{balance_btc:,.2f}</green> - "
                    f"Power: <blue>{balance_cexp:,.2f}</blue> CEXP"
                )

Ex: Account name: Account_1 - Balance: 1,234,567.89 - Btc balance: 1,234.30324 - Power: 577,177 CEXP

vanhbakaa commented 2 months ago

i already did