refactor: MVC 구조 분리 + 미사용 파일 archive 정리

- tick_trader.py를 Controller로 축소, 로직을 3개 모듈로 분리:
  - core/signal.py: 시그널 감지, 지표 계산 (calc_vr, calc_atr, detect_signal)
  - core/order.py: Upbit 주문 실행 (매수/매도/취소/조회)
  - core/position_manager.py: 포지션 관리, DB sync, 복구, 청산 조건
- type hints, Google docstring, 구체적 예외 타입 적용
- 50줄 초과 함수 분리 (process_signal, restore_positions)
- 미사용 파일 58개 archive/ 폴더로 이동
- README.md 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
joungmin
2026-03-06 20:46:47 +09:00
parent 976c53ed66
commit 6e0c4508fa
69 changed files with 5018 additions and 495 deletions

View File

@@ -1,14 +1,13 @@
"""OpenRouter LLM 기반 매 어드바이저.
"""OpenRouter LLM 기반 매 어드바이저.
매수: 시그널 감지 후 LLM이 매수 여부 + 지정가 결정
매도: 1분 주기로 LLM이 매도 목표가 결정 (cascade fallback)
시그널 감지 후 LLM이 매수 여부를 판단한다.
매도는 트레일링 스탑으로 대체되어 LLM을 사용하지 않는다.
LLM에게 제공하는 DB Tool (OpenAI function calling):
- get_price_ticks(ticker, minutes): Oracle price_tick 테이블 (최근 N분 가격 틱)
- get_ohlcv(ticker, limit): Oracle backtest_ohlcv 1분봉 (지지/저항 파악용)
- get_ticker_context(ticker): 종목 평판 정보 (가격 변동, 뉴스)
- get_trade_history(ticker): 최근 거래 이력 (승패, 손익)
- get_btc_trend(): BTC 최근 동향 (알트 매수 판단용)
DB Tool (OpenAI function calling):
- get_price_ticks: Oracle price_tick (최근 N분 가격 틱)
- get_ohlcv: Oracle backtest_ohlcv 1분봉
- get_ticker_context: 종목 평판 (가격 변동, 뉴스)
- get_btc_trend: BTC 최근 동향
"""
from __future__ import annotations