Skip to content

Commit

Permalink
Add more exmaple for HongKong market
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmysitu committed Mar 18, 2024
1 parent 0687ba1 commit cfe6de5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions examples/get_hsi.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit cfe6de5

Please sign in to comment.