Improve market data fetching routines.

This commit is contained in:
2025-07-23 12:11:49 +02:00
parent fa7eddf02f
commit bd27db49e7
4 changed files with 175 additions and 20 deletions

View File

@@ -373,4 +373,11 @@ def get_all_scanned_subreddits():
conn = get_db_connection()
results = conn.execute("SELECT DISTINCT name FROM subreddits ORDER BY name ASC;").fetchall()
conn.close()
return [row['name'] for row in results]
return [row['name'] for row in results]
def get_all_tickers():
"""Retrieves the ID and symbol of every ticker in the database."""
conn = get_db_connection()
results = conn.execute("SELECT id, symbol FROM tickers;").fetchall()
conn.close()
return results