refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.
This commit is contained in:
19
scratch_db_query.py
Normal file
19
scratch_db_query.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(0, os.path.abspath("."))
|
||||
from kis_trader.database import TradeDBExt
|
||||
|
||||
db = TradeDBExt()
|
||||
try:
|
||||
print("--- 키움 WS 실시간 수신 상태 확인 (가장 최근 틱 조회) ---")
|
||||
rows = db.conn.execute("SELECT code, price, volume, tick_time, source, recv_ts FROM ws_ticks ORDER BY recv_ts DESC LIMIT 5").fetchall()
|
||||
for row in rows:
|
||||
print(dict(row))
|
||||
|
||||
print("--- 캔들 최근 데이터 ---")
|
||||
rows2 = db.conn.execute("SELECT code, close, candle_time, source, is_confirmed FROM ws_candles ORDER BY id DESC LIMIT 5").fetchall()
|
||||
for row in rows2:
|
||||
print(dict(row))
|
||||
finally:
|
||||
db.close()
|
||||
Reference in New Issue
Block a user