feat: saxo history
This commit is contained in:
@@ -6116,3 +6116,13 @@ def get_saxo_snapshots(symbol: Optional[str] = None, date_from: Optional[str] =
|
||||
rows = conn.execute(query, params).fetchall()
|
||||
conn.close()
|
||||
return [dict(r) for r in rows]
|
||||
|
||||
|
||||
def get_saxo_snapshot_symbols() -> List[Dict[str, Any]]:
|
||||
conn = get_conn()
|
||||
rows = conn.execute("""
|
||||
SELECT symbol, COUNT(*) AS rows_count, MIN(snapshot_date) AS first_date, MAX(snapshot_date) AS last_date
|
||||
FROM saxo_option_snapshots GROUP BY symbol ORDER BY symbol
|
||||
""").fetchall()
|
||||
conn.close()
|
||||
return [dict(r) for r in rows]
|
||||
|
||||
Reference in New Issue
Block a user