Update stock notifications with company names and new schedule times

Add full company names to stock price notifications displayed alongside tickers. Update scheduled message times from hourly to three specific times: market open (9:30 AM ET), noon (12:00 PM ET), and market close (4:00 PM ET).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Michael Simard
2025-12-04 20:18:08 -06:00
parent c35771c77a
commit 45d9965638
3 changed files with 51 additions and 13 deletions

View File

@@ -33,6 +33,15 @@ class FinnhubAPI(StockAPIBase):
Dictionary with stock data or None if unavailable
"""
try:
# Get company name from company profile
company_name = None
try:
profile = self.client.company_profile2(symbol=ticker)
company_name = profile.get('name') or ticker.upper()
except Exception as e:
logger.warning(f"Could not fetch company name for {ticker}: {e}")
company_name = ticker.upper()
# Get current quote data
quote = self.client.quote(ticker)
@@ -56,6 +65,7 @@ class FinnhubAPI(StockAPIBase):
return {
'ticker': ticker.upper(),
'company_name': company_name,
'current_price': round(current_price, 2),
'previous_close': round(previous_close, 2),
'change_dollar': round(change_dollar, 2),