diff --git a/examples/get_hsi.py b/examples/get_hsi.py new file mode 100755 index 0000000..2386b17 --- /dev/null +++ b/examples/get_hsi.py @@ -0,0 +1,24 @@ +#!/usr/bin/python3 -u + +import msfinance as msf + +proxy = 'socks5://127.0.0.1:1088' + +stock = msf.Stock( + debug=True, + session='hsi.sql3', + proxy=proxy, +) + +tickers_list = stock.get_hsi_tickers() + +for ticker in sorted(tickers_list): + valuations = stock.get_valuations(ticker, 'xhkg') + financials = stock.get_financials(ticker, 'xhkg') + + print(f"Ticker: {ticker}") + for valuation in valuations: + print(valuation) + for financial in financials: + print(financial) +