refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.
This commit is contained in:
21
scratch/db_config_scalp.py
Normal file
21
scratch/db_config_scalp.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import sys
|
||||
sys.path.append('/home/hoon/kis_bot')
|
||||
from database import TradeDB
|
||||
|
||||
def check_db():
|
||||
db = TradeDB()
|
||||
try:
|
||||
row = db.conn.execute("SELECT * FROM config_scalp ORDER BY id DESC LIMIT 1").fetchone()
|
||||
if row:
|
||||
d = dict(row)
|
||||
print("config_scalp:")
|
||||
for k, v in d.items():
|
||||
if v is not None and v != "":
|
||||
print(f" {k}: {v}")
|
||||
else:
|
||||
print("config_scalp is empty")
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_db()
|
||||
Reference in New Issue
Block a user