64 lines
2.4 KiB
Bash
64 lines
2.4 KiB
Bash
# trex-core shared infrastructure + secrets (12-factor, REQ-010 CHG-20260609-01).
|
|
#
|
|
# These are SHARED across all per-instance TOML configs in this directory (same
|
|
# DB / broker / portfolio-hub / RabbitMQ), so they live here instead of the
|
|
# per-instance TOML.
|
|
#
|
|
# Resolution (trex_core.runtime.config):
|
|
# config_dir = --config-path (default ./config)
|
|
# --env-file <path> wins, else <config_dir>/.env
|
|
# (standalone reads with no config fall back to legacy CWD-relative .env)
|
|
# Real exported environment variables ALWAYS take precedence over this file.
|
|
# Use --config-path <abs-dir> to stay CWD-independent when launching elsewhere.
|
|
#
|
|
# Copy this template to `.env` in the same config dir and fill in:
|
|
# cp config/.env.example config/.env
|
|
|
|
# --- Core (required) ---
|
|
# psycopg DSN for the PostgreSQL single-writer store.
|
|
TREX_POSTGRESQL_DSN=dbname=trex_core host=/var/run/postgresql
|
|
|
|
# --- Daemon (optional, defaults shown) ---
|
|
TREX_TOTAL_SLOTS=10
|
|
TREX_EXECUTION_INTERVAL_SEC=1.0
|
|
|
|
# --- Broker selection (REQ-011/012/013) ---
|
|
# 'paper' (deterministic test double, default) | 'kis' (real KIS Open API)
|
|
TREX_BROKER=paper
|
|
|
|
# --- Paper broker tuning (only when TREX_BROKER=paper; for e2e scenarios) ---
|
|
# TREX_PAPER_FILL_AFTER_POLLS=0
|
|
# TREX_PAPER_QTY_PER_POLL=
|
|
# TREX_PAPER_REJECT_SYMBOLS=
|
|
|
|
# --- KIS broker (only when TREX_BROKER=kis) ---
|
|
# 모의투자(sandbox): https://openapivts.koreainvestment.com:29443
|
|
# 실계좌(live): https://openapi.koreainvestment.com:9443 (requires TREX_KIS_ALLOW_LIVE=true)
|
|
TREX_KIS_BROKER_BASE_URL=https://openapivts.koreainvestment.com:29443
|
|
TREX_KIS_BROKER_TIMEOUT=5
|
|
TREX_KIS_BROKER_APP_KEY=
|
|
TREX_KIS_BROKER_APP_SECRET=
|
|
TREX_KIS_BROKER_ACCOUNT_REF=12345678-01
|
|
TREX_KIS_ALLOW_LIVE=false
|
|
TREX_KIS_REDIS_URL=
|
|
|
|
# --- KIS account-read recovery (dcy-041; opt-in, KIS only) ---
|
|
TREX_ACCOUNT_SNAPSHOT_ENABLED=false
|
|
TREX_ACCOUNT_SNAPSHOT_BUY_MAX_AGE_SEC=600
|
|
TREX_ACCOUNT_SNAPSHOT_SELL_MAX_AGE_SEC=3600
|
|
TREX_ACCOUNT_SNAPSHOT_REFRESH_INTERVAL_SEC=300
|
|
|
|
# --- portfolio-hub ledger (REQ-017/018/019, BAT-006) ---
|
|
# portfolio_hub_token is per-instance and lives in the instance TOML, not here.
|
|
TREX_PORTFOLIO_HUB_BASE_URL=
|
|
TREX_PORTFOLIO_HUB_TIMEOUT=5
|
|
TREX_LEDGER_INTERVAL_SEC=1.0
|
|
|
|
# --- Snapshot scheduler (REQ-030, BAT-008) ---
|
|
TREX_SNAPSHOT_SCHEDULE_KST=07:30
|
|
TREX_SNAPSHOT_TICK_SEC=60
|
|
|
|
# --- RabbitMQ transport (REQ-022, BAT-007) ---
|
|
TREX_RABBITMQ_URL=
|
|
TREX_RABBITMQ_TIMEOUT=5
|