Files
AI-Trader/main.sh
Bill 1785f9b06f feat: automate merged.jsonl creation during price fetching
Streamline the data preparation workflow by having get_daily_price.py
automatically invoke merge_jsonl.py after fetching all stock prices.

Changes:
- Modified get_daily_price.py to call merge_jsonl.py automatically
- Updated entrypoint.sh to remove redundant merge_jsonl.py call
- Updated main.sh to remove redundant merge_jsonl.py call
- Fixed import order for linting compliance

Benefits:
- Single command now handles both fetching and merging
- Ensures merged.jsonl is always created after price updates
- Simplifies Docker container startup process
- Prevents missing merged.jsonl errors in production
2025-10-30 23:48:12 -04:00

34 lines
702 B
Bash

#!/bin/bash
# AI-Trader 主启动脚本
# 用于启动完整的交易环境
set -e # 遇到错误时退出
echo "🚀 Launching AI Trader Environment..."
echo "📊 Now getting and merging price data..."
cd ./data
# Note: get_daily_price.py now automatically calls merge_jsonl.py after fetching
python get_daily_price.py
cd ../
echo "🔧 Now starting MCP services..."
cd ./agent_tools
python start_mcp_services.py
cd ../
#waiting for MCP services to start
sleep 2
echo "🤖 Now starting the main trading agent..."
python main.py configs/default_config.json
echo "✅ AI-Trader stopped"
echo "🔄 Starting web server..."
cd ./docs
python3 -m http.server 8888
echo "✅ Web server started"