Skip to content

Commit 81f2137

Browse files
committed
DEV: refact dos comentários
1 parent 1556429 commit 81f2137

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

myTicker_Monitor.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,29 @@
1212
print(Panel.fit("Desenvolvido por: Vinícius Azevedo"))
1313

1414
while True:
15-
##############################################
16-
# FUNDOS IMOB
17-
##############################################
15+
# Ticker de FII e Ações
1816
tickers = ["MXRF11.SA", "MCCI11.SA", "HGRU11.SA", "DEVA11.SA", "PETR4.SA", "TAEE11.SA", "BBAS3.SA"]
1917
current_price = web.get_quote_yahoo(tickers)
2018

19+
##############################################
20+
# FUNDOS IMOB
21+
##############################################
2122
table_fii = Table(title="Fundos Imobiliários + Ações")
2223
table_fii.add_column(" ", justify="right", style="blue")
2324
table_fii.add_column("MXRF11", justify="center", style="cyan")
2425
table_fii.add_column("MCCI11", justify="center", style="magenta")
2526
table_fii.add_column("HGRU11", justify="center", style="green")
2627
table_fii.add_column("DEVA11", justify="center", style="yellow")
28+
29+
##############################################
30+
# AÇÕES
31+
##############################################
2732
table_fii.add_column("PETR4", justify="center", style="white")
2833
table_fii.add_column("TAEE11", justify="center", style="white")
2934
table_fii.add_column("BBAS3", justify="center", style="white")
3035

3136

37+
# Funções para monitoramento dos valores
3238
def current_price(tickers):
3339
current_price = web.get_quote_yahoo(tickers)["price"]
3440
return current_price
@@ -48,11 +54,13 @@ def regular_market_low(tickers):
4854
market_low = web.get_quote_yahoo(tickers)["regularMarketDayLow"]
4955
return market_low
5056

57+
# Chamando as funções
5158
preços = current_price(tickers)
5259
mud_reg_merc = regular_market_change(tickers)
5360
high = regular_market_high(tickers)
5461
low = regular_market_low(tickers)
5562

63+
# Input de dados na linha da tabela
5664
table_fii.add_row("Preço Atual (R$)", str(preços[0]), str(preços[1]), str(preços[2]), str(preços[3]), str(preços[4]), str(preços[5]), str(preços[6]))
5765
table_fii.add_row("Variação +-", str(round(mud_reg_merc[0],2)), str(round(mud_reg_merc[1],2)), str(round(mud_reg_merc[2],2)), str(round(mud_reg_merc[3],2)), str(round(mud_reg_merc[4],2)), str(round(mud_reg_merc[5],2)), str(round(mud_reg_merc[6],2)))
5866
table_fii.add_row("Maior Preço ⬆", str(high[0]), str(high[1]), str(high[2]), str(high[3]), str(high[4]), str(high[5]), str(high[6]))
@@ -72,12 +80,14 @@ def regular_market_low(tickers):
7280
table_div.add_column("TAEE11", justify="center", style="white")
7381
table_div.add_column("BBAS3", justify="center", style="white")
7482

83+
# Iteração dos valores dos dividendos referente ao último mes
7584
dividends =[]
7685
for i in tickers:
7786
div_data = get_dividends(i, "2022/12/28")
7887
data = div_data.values
7988
dividends.append(data)
8089

90+
# Input de dados na linha da tabela
8191
table_div.add_row(
8292
"Último Div. (R$)",
8393
str(dividends[0][0][0]),

0 commit comments

Comments
 (0)