#!/bin/bash
# Phase C dry-run (~금요일 저녁). 프로젝트 루트에서 실행.
set -e
cd "$(dirname "$0")/.."
PY="${PY:-/Users/dsyoon/opt/anaconda3/envs/coin/bin/python}"

echo "=== Phase C: LIVE_TRADING_ENABLED=0 확인 ==="
$PY -c "import runpy; from pathlib import Path; runpy.run_path('scripts/_bootstrap.py'); import config; assert not config.LIVE_TRADING_ENABLED, 'LIVE must be 0'"

echo "=== 01 봉 갱신 (1일 1회 권장) ==="
$PY scripts/01_download.py

echo "=== verify ==="
$PY scripts/06_verify_live_dryrun.py

echo "=== 06 dry-run 상시 (Ctrl+C 종료) ==="
exec $PY scripts/06_execute_live.py
