mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-02 01:27:24 -04:00
Final phase of v0.3.0 implementation - all core features complete. Price Tools Migration: - Update get_open_prices() to query price_data table - Update get_yesterday_open_and_close_price() to query database - Remove merged.jsonl file I/O (replaced with SQLite queries) - Maintain backward-compatible function signatures - Add db_path parameter (default: data/jobs.db) Configuration: - Add AUTO_DOWNLOAD_PRICE_DATA to .env.example (default: true) - Add MAX_SIMULATION_DAYS to .env.example (default: 30) - Document new configuration options Documentation: - Comprehensive CHANGELOG updates for v0.3.0 - Document all breaking changes (API format, data storage, config) - Document new features (on-demand downloads, date ranges, database) - Document migration path (scripts/migrate_price_data.py) - Clear upgrade instructions Breaking Changes (v0.3.0): 1. API request format: date_range -> start_date/end_date 2. Data storage: merged.jsonl -> price_data table 3. Config variables: removed RUNTIME_ENV_PATH, MCP ports, WEB_HTTP_PORT 4. Added AUTO_DOWNLOAD_PRICE_DATA, MAX_SIMULATION_DAYS Migration Steps: 1. Run: python scripts/migrate_price_data.py 2. Update API clients to use new date format 3. Update .env with new variables 4. Remove old config variables Status: v0.3.0 implementation complete Ready for: Testing, deployment, and release
42 lines
1.8 KiB
Plaintext
42 lines
1.8 KiB
Plaintext
# =============================================================================
|
|
# AI-Trader Environment Configuration
|
|
# =============================================================================
|
|
# Copy this file to .env and fill in your actual values
|
|
# Docker Compose automatically reads .env from project root
|
|
|
|
# AI Model API Configuration
|
|
# OPENAI_API_BASE: Leave empty to use default OpenAI endpoint, or set to custom proxy URL
|
|
OPENAI_API_BASE=
|
|
OPENAI_API_KEY=your_openai_key_here # https://platform.openai.com/api-keys
|
|
|
|
# Data Source Configuration
|
|
ALPHAADVANTAGE_API_KEY=your_alphavantage_key_here # https://www.alphavantage.co/support/#api-key
|
|
JINA_API_KEY=your_jina_key_here # https://jina.ai/
|
|
|
|
# API Server Port (exposed on host machine for REST API)
|
|
# Container ALWAYS uses port 8080 internally (hardcoded in entrypoint.sh)
|
|
# This variable ONLY controls the host port mapping (host:API_PORT -> container:8080)
|
|
# Change this if port 8080 is already in use on your host machine
|
|
# Example: API_PORT=8889 if port 8080 is occupied by another service
|
|
# Used for Windmill integration and external API access
|
|
API_PORT=8080
|
|
|
|
# Agent Configuration
|
|
AGENT_MAX_STEP=30
|
|
|
|
# Simulation Configuration
|
|
# Maximum number of days allowed in a single simulation range
|
|
# Prevents accidentally requesting very large date ranges
|
|
MAX_SIMULATION_DAYS=30
|
|
|
|
# Price Data Configuration
|
|
# Automatically download missing price data from Alpha Vantage when needed
|
|
# If disabled, all price data must be pre-populated in the database
|
|
AUTO_DOWNLOAD_PRICE_DATA=true
|
|
|
|
# Data Volume Configuration
|
|
# Base directory for all persistent data (will contain data/, logs/, configs/ subdirectories)
|
|
# Use relative paths (./volumes) or absolute paths (/home/user/ai-trader-volumes)
|
|
# Defaults to current directory (.) if not set
|
|
VOLUME_PATH=.
|