Go to file
Tomortec abab4c6b7f docs: update README and add a VERSION 2025-07-02 19:04:24 +08:00
assets chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00
cli fix: change default ticker 2025-07-02 18:23:27 +08:00
tradingagents fix: change default ticker 2025-07-02 18:23:27 +08:00
.gitignore feat: get ta indicators from taapi 2025-07-01 20:39:11 +08:00
.python-version main works, cli bugs 2025-06-15 22:20:59 -07:00
EXAMPLE_REPORT.md docs: update README and add a VERSION 2025-07-02 19:04:24 +08:00
LICENSE chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00
README-CN.md docs: update README and add a VERSION 2025-07-02 19:04:24 +08:00
README.md docs: update README and add a VERSION 2025-07-02 19:04:24 +08:00
VERSION docs: update README and add a VERSION 2025-07-02 19:04:24 +08:00
main.py feat: deprecate stock utilities 2025-06-27 23:34:48 +08:00
pyproject.toml main works, cli bugs 2025-06-15 22:20:59 -07:00
requirements.txt feat: fetch posts from Reddit 2025-07-02 17:46:48 +08:00
setup.py chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00
uv.lock main works, cli bugs 2025-06-15 22:20:59 -07:00

README.md

Crypto Trading Agents

License Python Version Docs Original Paper

🛠️ Usage Guide

Installation

Clone the repository:

git clone https://github.com/Tomortec/CryptoTradingAgents.git
cd TradingAgents

Create a virtual environment:

conda create -n tradingagents python=3.13
conda activate tradingagents

Install dependencies:

pip install -r requirements.txt

Configuration

Configure LLM API Key

Create a .env file under the ./cli directory and fill in your LLM API key, such as: For Qwen: DASHSCOPE_API_KEY=XXXXXX For ChatGPT: OPENAI_API_KEY=XXXXXX

See Supported LLMs and API Key Naming

Configure Information Source API Keys

Also add the required API keys for data sources into the ./cli/.env file

See Supported Information Sources

Check and Modify Configuration

Edit ./tradingagents/default_config.py to change the language, LLM settings, and other default configurations.

(Optional) Configure Investment Preferences

Create a file named investment_preferences in the ./cli directory to define custom investment preferences.

Run the Program

Execute the main program from terminal:

python -m cli.main

Steps to Use

  1. Enter Asset Symbol, such as BTC or ETH
  2. Enter Analysis Date, consistent with the source project
  3. Select Analyst Team, consistent with the source project
  4. Choose Research Depth, consistent with the source project
  5. Import External Reports: Type y and press Enter to open the default editor, where you can input external viewpoints for the model to consider. Save the file when done.
  6. Import Investment Preferences: Use the saved file at ./cli/investment_preferences or input them directly in the editor (optional).
  7. Select LLM Model, consistent with the source project
  8. Generate Report: After processing, the report will be saved under ./tradingagents/reports. Example: BTC Analysis (Chinese Version)

Supported LLMs

Name API Variable Tested
Qwen (by Alibaba) DASHSCOPE_API_KEY
ChatGPT (by OpenAI) OPENAI_API_KEY

Supported Information Sources

Source Name API Variable Data Type Registration
Alternative.me Fear & Greed Index None needed Sentiment N/A
Binance K-line, market depth, 24h price change, long/short ratio None needed Market N/A
Blockbeats Blockbeats News None needed News N/A
CoinDesk CoinDesk News COINDESK_API_KEY News API Key Registration
CoinStats CoinStats News COINSTATS_API_KEY News API Registration
Reddit Reddit Posts REDDIT_CLIENT_ID, REDDIT_CLIENT_SECRET, REDDIT_USERNAME, REDDIT_PASSWORD, REDDIT_USER_AGENT Sentiment & News Register App
taapi.io Technical indicators like EMA, MACD, RSI, Supertrend, Bollinger Bands, Three White Soldiers, etc. TAAPI_API_KEY Technical Analysis My Account

Customization

Customize Prompts

Edit files under ./tradingagents/i18n/prompts

Customize Data Sources

Refer to ./tradingagents/dataflows/README.md


🔄 Planned Updates

  • Add LLM search capabilities for richer information retrieval
  • Enable automatic report delivery
  • Improve prompt templates using latest LLM research
  • Integrate additional price prediction tools
  • Provide a UI interface

⚠️ Disclaimer

This project is for research and educational purposes only and does not constitute investment advice. Investing involves risk—make decisions cautiously.


We welcome contributions! Including but not limited to submitting issues, fixing bugs, adding features, improving documentation, and localization.
If this project helps you, please consider giving us a star!