4cb206a269
매수/매도 주문 및 계좌 잔고조회를 API로 직접 실행하지 않는다는 원칙을 코드 레벨에서 강제하는 안전게이트(governance/rules/06, 07)와 함께, 시세/호가/공매도거래비중 등 조회전용 KIS Open API 연동 및 SQLite 수집 파이프라인을 추가한다. - kis_api_client_v1: 모든 요청이 _assert_read_only를 통과해야 하며 /trading/ 경로·주문 TR_ID는 RuntimeError로 즉시 차단 - kis_data_collection_v1: KIS 우선 + Naver 폴백, 네트워크 실패는 개별 ticker 단위로 흡수(배치 전체 중단 없음) - data_collection_store_v1 / storage_backend_v1: SQLite 캐노니컬 저장소, PostgreSQL 전환 대비 백엔드 추상화 - Gitea 영업일 스케줄(2시간 간격) + CI 강제 게이트 (validate_no_direct_api_trading_v1, validate_kis_api_credentials_v1)
17 lines
1.2 KiB
YAML
17 lines
1.2 KiB
YAML
schema_version: agents_rule.v1
|
|
rule_id: CORE_LOCKS_V1
|
|
title: Core locks and no-hallucination rules
|
|
summary:
|
|
- "[NO_DIRECT_API_TRADING] 매수/매도 주문은 어떤 API(한국투자증권 KIS Open API 포함)를 통해서도
|
|
직접 실행하지 않는다. 이 엔진의 모든 산출물은 '제안'이며, 실제 주문 실행은 반드시 사람이
|
|
HTS에서 수동으로 입력한다. 이 원칙을 어기면 엔진 전체가 의미를 잃는다(사용자 직접 지시,
|
|
2026-06-21) — governance/rules/06_no_direct_api_trading.yaml 참조."
|
|
- "[NO_KIS_ACCOUNT_BALANCE_QUERY] KIS Open API로 계좌 보유종목/잔고를 조회하지 않는다.
|
|
보유종목의 유일한 출처는 HTS 캡처 → account_snapshot이다(사용자 직접 지시, 2026-06-21)
|
|
— governance/rules/07_no_kis_account_balance_query.yaml 참조."
|
|
- Use spec/13_formula_registry.yaml for all prices, stops, targets, quantities.
|
|
- Do not invent prices, quantities, or formulas.
|
|
- If harness data is missing, print DATA_MISSING — 하네스 업데이트 필요.
|
|
- Preserve transparency for blocked items; never hide computed fields.
|
|
- Use only registered formulas and source-of-truth artifacts.
|