pxsocs/warden_terminal

Feature Request - Portfolio Value

Closed this issue · 2 comments

I was playing around and thought about having a real-time BTC portfolio value in the header. By adding a variable in the Config.ini called "Own", we can easily pull that quantity of BTC, multiply by the current price of BTC, and then show it in the header. This would allow users to see their BTC portfolio value even if they do not have any Sats in their node's BTC wallet. If there is ever trending added, this would be a cool point to watch. Thoughts?

Config.ini:
[CURRENCIES]
primary_fx = 'USD'
fx_list = ['USD','EUR', 'GBP', 'CAD']
Own = 3.18688358

dashboard.py
if small_display is True:
from node_warden import load_config
config = load_config(quiet=True)
config = config['CURRENCIES']
Own = config.getfloat("Own")
primary_fx = ast.literal_eval(config.get('primary_fx'))
Worth = float(btc_price * Own)
txt = 'WARden Node Edition (Version: ' + version(
) + ") | " f"${jformat(btc_price, 0)} {primary_fx}/BTC " + " | " + f"Own: {Own} BTC | " + f"Net: ${jformat(Worth, 0)} {primary_fx}"
Screen Shot 2021-07-30 at 3 05 06 PM

Great suggestion and being implemented with a slight change. Given there's already too much info on the header, which makes it particularly crowded on smaller displays, the info will be displayed in 2 widgets - see below.

It also complies with the Hidden key press so when Hidden is True, info is not displayed.

config.ini now has a new section:

[PORTFOLIO]
position_btc = 1.00

image

image

Implemented on the latest version: (ff292c8)