WBS-7.3: GAS→Python 마이그레이션 5개 항목 완료 (F14, F02-F06)
- F14: late_chase_risk_score 검증 * GAS가 유일한 생산처 (Python canonical 없음) * migration_action: KEEP_IN_GAS로 정정, status: DONE - F02/F03/F04/F06: priceBasis 로직 포팅 * formulas/price_basis_v1.py: select_price_basis_tier2/tier1 구현 * tests/parity/test_price_basis_parity_v1.py: 8 parity 테스트 (모두 PASS) * GAS Number.isFinite() 의미론 정확히 재현 (math.isfinite 사용) * 모든 테스트 112/112 PASS 남은 작업 (4개): - F05: decision_logic (action assignment) - F07: score_logic (threshold addition) - F10: routing decision - F15: late_chase_gate Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
# Synology KIS Data Collection Setup
|
||||
|
||||
This note answers how to run:
|
||||
|
||||
```powershell
|
||||
$env:KIS_APP_Key="..."
|
||||
$env:KIS_APP_Secret="..."
|
||||
python tools/run_kis_data_collection_v1.py --input-json GatherTradingData.json --sqlite-db outputs/kis_data_collection/kis_data_collection.db --output-json Temp/kis_data_collection_v1.json --kis-account real
|
||||
```
|
||||
|
||||
on Synology DSM.
|
||||
|
||||
## Rule
|
||||
|
||||
Synology is Linux-based, so use `export` or a sourced env file. Do not use Windows `$env:` syntax.
|
||||
|
||||
The code reads these exact, case-sensitive names for real accounts:
|
||||
|
||||
- `KIS_APP_Key`
|
||||
- `KIS_APP_Secret`
|
||||
|
||||
For mock accounts, the names are:
|
||||
|
||||
- `KIS_APP_Key_TEST`
|
||||
- `KIS_APP_Secret_TEST`
|
||||
|
||||
## Recommended DSM Task Scheduler script
|
||||
|
||||
Create a `User-defined script` task and run:
|
||||
|
||||
```bash
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
ROOT_DIR="/volume1/projects/data_feed"
|
||||
|
||||
export KIS_APP_Key="your_real_app_key"
|
||||
export KIS_APP_Secret="your_real_app_secret"
|
||||
|
||||
cd "$ROOT_DIR"
|
||||
python tools/run_kis_data_collection_v1.py \
|
||||
--input-json GatherTradingData.json \
|
||||
--sqlite-db outputs/kis_data_collection/kis_data_collection.db \
|
||||
--output-json Temp/kis_data_collection_v1.json \
|
||||
--kis-account real
|
||||
```
|
||||
|
||||
## Better practice for secrets
|
||||
|
||||
Store secrets in a private env file and source it from the task:
|
||||
|
||||
```bash
|
||||
set -eu
|
||||
ROOT_DIR="/volume1/projects/data_feed"
|
||||
SECRETS_FILE="/volume1/projects/data_feed/.secrets/kis_real.env"
|
||||
|
||||
. "$SECRETS_FILE"
|
||||
cd "$ROOT_DIR"
|
||||
python tools/run_kis_data_collection_v1.py \
|
||||
--input-json GatherTradingData.json \
|
||||
--sqlite-db outputs/kis_data_collection/kis_data_collection.db \
|
||||
--output-json Temp/kis_data_collection_v1.json \
|
||||
--kis-account real
|
||||
```
|
||||
|
||||
Suggested file permissions:
|
||||
|
||||
- owner-only read/write
|
||||
- no shared group access
|
||||
- no commit to git
|
||||
|
||||
## Mock account variant
|
||||
|
||||
```bash
|
||||
export KIS_APP_Key_TEST="your_mock_app_key"
|
||||
export KIS_APP_Secret_TEST="your_mock_app_secret"
|
||||
python tools/run_kis_data_collection_v1.py \
|
||||
--input-json GatherTradingData.json \
|
||||
--sqlite-db outputs/kis_data_collection/kis_data_collection.db \
|
||||
--output-json Temp/kis_data_collection_v1.json \
|
||||
--kis-account mock \
|
||||
--no-live-kis
|
||||
```
|
||||
|
||||
## What the collector writes
|
||||
|
||||
- SQLite: `outputs/kis_data_collection/kis_data_collection.db`
|
||||
- JSON summary: `Temp/kis_data_collection_v1.json`
|
||||
|
||||
The latest collected summary in this workspace shows:
|
||||
|
||||
- `row_count = 25`
|
||||
- `kis_open_api = 21`
|
||||
- `gathertradingdata_json = 25`
|
||||
|
||||
Reference in New Issue
Block a user