Files
kis_bot/scratch/test_ls_insert.py
Your Name e1ac8d119b chore: 작업 중 발생한 부수적 변경 사항 및 누락된 파일 전체 커밋
- 프론트엔드 UI 업데이트 (backtest.html, backtest.js) 엔진 라디오 버튼 통합 관련 반영
- Rust 플러그인(kis_rust_core) 및 컴파일 소스코드 추가
- CLI 백테스트 스크립트 수정 및 최신화
- 기타 스크래치 테스트 스크립트, 로그 요약 마크다운(.md) 등 누락 파일 일괄 반영
- 추가적으로 아직 발견되지 않은 엣지 케이스나 렌더링 오류가 포함되어 있을 가능성이 있음
2026-09-06 17:04:50 +09:00

30 lines
726 B
Python

import logging
logging.basicConfig(level=logging.DEBUG)
from database import TradeDB
from datetime import datetime
db = TradeDB()
try:
res = db.insert_ls_ws_tick(
code="005930",
ts=datetime.now(),
price=1000,
volume=10,
tot_volume=100,
chetime="123456",
tr_cd="TEST",
tk="20260903123456",
lag_sec=1.5
)
print("Insert Tick Result:", res)
res2 = db.insert_ls_ws_orderbook(
code="005930",
snap={"snap_time": "20260903123456", "best_bid": 100, "best_ask": 101},
market="KR",
tk="20260903123456",
lag_sec=0.1
)
print("Insert OB Result:", res2)
except Exception as e:
print("Error:", e)