feat: saxo history

This commit is contained in:
OpenSquared
2026-07-18 18:26:07 +02:00
parent 6cfa36b710
commit ff242bd2a6
9 changed files with 258 additions and 20 deletions

View File

@@ -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]