feat: Enhance trading system with new permanent subscription features and order book management
Changes: - Added a new API endpoint for managing permanent subscriptions, allowing users to enable or disable subscriptions dynamically. - Implemented a function to fill candle data from Kiwoom, ensuring that only relevant data is inserted into the database. - Introduced a mechanism to handle master subscription states, improving the management of subscription statuses. - Updated the database schema to include new fields for managing subscription states and order book filtering. Impact: - These enhancements improve the flexibility and reliability of the trading system, allowing for better management of subscriptions and order book data, while reducing the risk of data inconsistencies. 히스토리 align 제거 븅신같은 초기설계 아예 제거 진입모드에 구멍메움 호가진입을 켜도 호가가 안들어올때 호가 안보고 그냥 사버림
This commit is contained in:
@@ -23,11 +23,11 @@
|
||||
|
||||
### 0. 조건검색 유니버스 (LS / 키움) — 시드·재시도
|
||||
|
||||
> LS 공백·ALIGN·job 이벤트 수정 시. 상세: [code_architecture.md 수동 노트](./code_architecture.md)
|
||||
> LS 공백·job 이벤트 수정 시. 상세: [code_architecture.md 수동 노트](./code_architecture.md)
|
||||
|
||||
```bash
|
||||
grep -rn "LS_T1859_EMPTY_RETRY\|t1859\|_refresh_empty\|STALE_RESYNC\|rows_prefer" /home/hoon/kis_bot/kis_trader/network --include="*.py"
|
||||
grep -rn "condition_common\|condition_job_events\|LIVE_UNIVERSE_SLOT_ALIGN\|CAND_LIMIT" /home/hoon/kis_bot --include="*.py" -l
|
||||
grep -rn "condition_common\|condition_job_events\|CAND_LIMIT" /home/hoon/kis_bot --include="*.py" -l
|
||||
```
|
||||
|
||||
**체크리스트**:
|
||||
@@ -57,6 +57,10 @@ grep -n "MOMENTUM_E_MIN_CHG_PCT" /home/hoon/kis_bot/database.py
|
||||
grep -r "E_MIN_CHG_PCT" /home/hoon/kis_bot/kis_trader/engine/momentum_env_keys.py
|
||||
```
|
||||
|
||||
호가 필터 나이: `WS_ORDERBOOK_FILTER_MAX_AGE_SEC`(기본 0=마지막 RAM) ≠ 저장 TTL `WS_ORDERBOOK_TICK_MAX_AGE_SEC`.
|
||||
후처리 TPE 진입 격자: `OPTUNA_OB_ENTRY_SPREAD_*` / `RATIO_*` / `ASK_MULT_*` (`optuna_common.ensure_optuna_gate_env_defaults`).
|
||||
꼬리 TPE 진입모드는 탐색 축이 아님(웹 체크 → 스터디 고정/순차 2회). `*_SKIP_HTS_SCAN_DUPES` true 금지.
|
||||
|
||||
**확인 후 수정해야 할 곳 체크리스트**:
|
||||
- [ ] `database.py` — CREATE TABLE에 컬럼 추가
|
||||
- [ ] `kis_trader/engine/momentum_env_keys.py` — `MOMENTUM_CONFIG_KEYS` 등록
|
||||
@@ -226,6 +230,14 @@ HTS는 후보 유니버스 참고용.
|
||||
database.py의 CREATE TABLE 컬럼에 있는 키 → 해당 config_* 테이블 컬럼
|
||||
database.py의 CREATE TABLE에 없는 키 → env_config_ext (key-value 테이블)
|
||||
새 env 키 추가 시 두 경로 중 어디에 저장될지 확인 필요.
|
||||
Optuna 후처리(실매 엔진 비영향): OPTUNA_POST_TOP_N / INCLUDE_MODE / INCLUDE_LIVE /
|
||||
OB·WHIPSAW trial 수 · OPTUNA_OB_AXIS_TRIALS · 진입/익절/STOP 탐색 범위 —
|
||||
ensure_optuna_gate_env_defaults → env_config_ext.
|
||||
모듈: kis_trader/backtest/optuna_postprocess_topn.py · optuna_orderbook_recommend.py
|
||||
· optuna_rerun_postprocess.py (구 JSON 「이 잡 후처리 재실행」)
|
||||
진입 격자(2026-08-15): OPTUNA_OB_ENTRY_SPREAD 0.1~8 / RATIO 0.05~1.5 / ASK_MULT 1~80 / LOOKBACK 30분.
|
||||
실매 필터 나이: WS_ORDERBOOK_FILTER_MAX_AGE_SEC(0) ≠ WS_ORDERBOOK_TICK_MAX_AGE_SEC(저장).
|
||||
사진 한 장도 없으면: WS_ORDERBOOK_FILTER_REJECT_IF_EMPTY(기본 true) → 필터 ON일 때 안 삼.
|
||||
```
|
||||
|
||||
### e_min_chg_pct 단위
|
||||
|
||||
Reference in New Issue
Block a user