-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
34 lines (30 loc) · 808 Bytes
/
main.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
from stocks import Stock, StockManager, User
from time import sleep
if __name__ == '__main__':
ammons_stocks = StockManager(
[
Stock('TSLA'),
Stock('TWTR'),
Stock('F'),
Stock('AAPL'),
Stock('ACB'),
Stock('SNAP'),
Stock('SPOT')
]
)
tanners_stocks = StockManager(
[
Stock('TSLA'),
Stock('XSPA'),
Stock('AMD'),
Stock('AAPL'),
Stock('SPOT')
]
)
ammon = User(ammons_stocks, '[email protected]')
tanner = User(tanners_stocks, '[email protected]')
while True:
# checks all stocks in StockManager, cycles every minute
ammon.checkStocks()
tanner.checkStocks()
sleep(600)