refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.
This commit is contained in:
19
scratch/check_ws_ticks_source.py
Normal file
19
scratch/check_ws_ticks_source.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from database import TradeDB
|
||||
db = TradeDB()
|
||||
try:
|
||||
sql = """
|
||||
SELECT
|
||||
source, COUNT(*) as cnt
|
||||
FROM ws_ticks
|
||||
WHERE DATE(recv_ts) = '2026-08-10'
|
||||
GROUP BY source;
|
||||
"""
|
||||
rows = db.conn.execute(sql).fetchall()
|
||||
|
||||
import json
|
||||
print("\n--- ws_ticks source count Today ---")
|
||||
for r in rows:
|
||||
print(json.dumps(dict(r)))
|
||||
|
||||
finally:
|
||||
db.close()
|
||||
Reference in New Issue
Block a user