프롬프트 생성/복사 방식으로 전환하여 더 이상 불필요한
/api/stock/ai-analysis 엔드포인트, ai_analyst.py, google-generativeai 패키지 제거
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ai_analyst.py 신규: Gemini Pro 연동 포트폴리오 분석 모듈
- 보유 종목 현재가 + 뉴스 기반 프롬프트 생성
- 종목별 매도/매수/분할매도 행동 지침 포함
- 5분 메모리 캐시 (force 파라미터로 강제 갱신 가능)
- GET /api/stock/ai-analysis 엔드포인트 추가
- requirements.txt: google-generativeai>=0.8.0 추가
환경변수 필요: GEMINI_API_KEY (Google AI Studio)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- sell_history 테이블 신규 생성 (db.py init_db)
- CRUD 함수 추가: add_sell_history, get_sell_history, delete_sell_history
- GET /api/portfolio/sell-history (broker, days 필터)
- POST /api/portfolio/sell-history (id 포함 저장된 레코드 반환)
- DELETE /api/portfolio/sell-history/{record_id}
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>