Files
kis_bot/scratch/check_ob_tables.py

13 lines
413 B
Python

from database import TradeDB
db = TradeDB()
try:
for t in ['kis_ws_orderbook', 'ls_ws_orderbook']:
try:
sql = f"SELECT COUNT(*) as cnt FROM {t} WHERE DATE(recv_ts) = '2026-08-10'"
cnt = db.conn.execute(sql).fetchone()['cnt']
print(f"Table {t}: {cnt} rows today")
except Exception as e:
print(f"Could not count {t}: {e}")
finally:
db.close()