-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plotly.py
48 lines (37 loc) · 1.25 KB
/
Plotly.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import Wallet as wl
from dash import Dash
from dash_bootstrap_components.themes import BOOTSTRAP
from app.layout import create_layout
app = Dash(__name__)
def main() -> None:
root = "/home/doreis/Documents/"
root += "Investing"
wallet_t212 = wl.Wallet(root + "/wallet")
wallet_t212.run(wl.Input(broker=wl.Broker.TRADING212, statement_dir=f"{root}/transactions_trading212"))
wallet_td = wl.Wallet(root + "/wallet")
wallet_td.run(
wl.Input(
broker=wl.Broker.TDAMERITRADE,
statement_dir=f"{root}/transactions_td_ameritrade",
recommended_wallet=f"{root}/transactions_td_ameritrade/global_wallet.json",
)
)
wallet_cs = wl.Wallet(root + "/wallet")
wallet_cs.run(
wl.Input(
broker=wl.Broker.CHARLES_SCHWAB,
statement_dir=f"{root}/transactions_schwab",
recommended_wallet=f"{root}/transactions_schwab/global_wallet.json",
)
)
configs = {
"TDAmeritrade": wallet_td,
"Trading212": wallet_t212,
"Schwab": wallet_cs,
}
app = Dash(external_stylesheets=[BOOTSTRAP])
app.title = "Financial Dashboard"
app.layout = create_layout(app, configs)
app.run()
if __name__ == "__main__":
main()