refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.

This commit is contained in:
Your Name
2026-08-12 10:19:19 +09:00
parent cb7e5037a0
commit c6bd62a25f
218 changed files with 31613 additions and 759 deletions

26
scratch/db_check.py Normal file
View File

@@ -0,0 +1,26 @@
import sys
import os
sys.path.append('/home/hoon/kis_bot')
from database import TradeDB
def check_db():
db = TradeDB()
try:
# Check tables
tables = [dict(r) for r in db.conn.execute("SHOW TABLES").fetchall()]
print("Tables:", tables)
# Let's check environment variables and settings related to slots and buying
cols_env = [dict(r)["Field"] for r in db.conn.execute("SHOW COLUMNS FROM env_settings").fetchall()]
print("env_settings cols:", cols_env)
env_vars = db.conn.execute("SELECT * FROM env_settings").fetchall()
for env in env_vars:
print(dict(env))
finally:
db.close()
if __name__ == "__main__":
check_db()