Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:51bitquant Ai hedge fund crypto Python Env

From Leeroopedia
Knowledge Sources
Domains Infrastructure, Quant_Trading
Last Updated 2026-10-28 09:34 GMT

Overview

Python 3.12+ runtime with LangChain/LangGraph, pandas, numpy, matplotlib, and the full ai-hedge-fund-crypto dependency stack.

Description

This environment provides the standard Python runtime for running the ai-hedge-fund-crypto trading system. It is built on Python 3.12+ and installs the full dependency set declared in pyproject.toml, including LangChain and LangGraph for LLM-driven decision making, pandas/numpy for data manipulation, matplotlib for equity curve plotting, colorama/tabulate for terminal output, and the python-binance-derived gateway client for market data access. No GPU is required — all computation is CPU-bound.

Usage

Use this environment for any workflow in the repository: backtesting, live trading signals, or custom strategy creation. It is the mandatory prerequisite for every Implementation that does not directly require external API access (Binance or LLM). It must be set up before running main.py or backtest.py.

System Requirements

Category Requirement Notes
OS Linux / macOS / Windows (WSL2) Cross-platform Python; terminal coloring via colorama
Hardware CPU-only No GPU required; all indicator and backtest computation is CPU-bound
Disk 100 MB + cache space ./cache/ directory stores CSV kline data (size depends on backtest range)
Python >= 3.12 Declared in pyproject.toml: requires-python = ">=3.12"

Dependencies

System Packages

  • Python >= 3.12
  • git (for cloning)

Python Packages

  • langchain >= 0.3.24
  • langchain-openai >= 0.3.16
  • langchain-groq >= 0.1.0
  • langchain-google-genai >= 2.1.5
  • langchain-anthropic >= 0.3.15
  • langchain-ollama >= 0.3.3
  • langchain-community >= 0.3.23
  • langgraph >= 0.4.1
  • pandas >= 2.2.3
  • matplotlib >= 3.10.1
  • colorama >= 0.4.6
  • tabulate >= 0.9.0
  • pydantic-settings >= 2.9.1
  • pyyaml >= 6.0.2
  • orjson (via pyyml >= 0.0.2)
  • aiohttp >= 3.11.18
  • requests >= 2.32.3
  • websockets >= 15.0.1
  • pycryptodome >= 3.22.0
  • dateparser >= 1.2.1
  • dotenv >= 0.9.9
  • yarl >= 1.20.0

Credentials

No credentials are required for this environment itself. Credentials for Binance and LLM providers are documented in Environment:51bitquant_Ai_hedge_fund_crypto_Binance_API_Access and Environment:51bitquant_Ai_hedge_fund_crypto_LLM_API_Access respectively. A .env file is loaded at import time via load_dotenv() in settings.py.

Quick Install

# Install all required packages (Python 3.12+ required)
pip install langchain>=0.3.24 langchain-openai>=0.3.16 langchain-groq>=0.1.0 \
    langchain-google-genai>=2.1.5 langchain-anthropic>=0.3.15 langchain-ollama>=0.3.3 \
    langchain-community>=0.3.23 langgraph>=0.4.1 pandas>=2.2.3 matplotlib>=3.10.1 \
    colorama>=0.4.6 tabulate>=0.9.0 pydantic-settings>=2.9.1 pyyaml>=6.0.2 \
    pyyml>=0.0.2 aiohttp>=3.11.18 requests>=2.32.3 websockets>=15.0.1 \
    pycryptodome>=3.22.0 dateparser>=1.2.1 dotenv>=0.9.9 yarl>=1.20.0

# Or use uv / pip with the project directly
pip install -e .

Code Evidence

Python version requirement from pyproject.toml:5-6:

[project]
requires-python = ">=3.12"

Full dependency list from pyproject.toml:7-31:

dependencies = [
    "aiohttp>=3.11.18",
    "colorama>=0.4.6",
    "langchain>=0.3.24",
    "langchain-openai>=0.3.16",
    "langgraph>=0.4.1",
    "pandas>=2.2.3",
    "matplotlib>=3.10.1",
    "pydantic-settings>=2.9.1",
    # ... (full list above)
]

Config loading at import time from src/utils/settings.py:6-9:

from .constants import Interval
import yaml
from typing import List, Optional
from dotenv import load_dotenv

load_dotenv()

Common Errors

Error Message Cause Solution
ModuleNotFoundError: No module named 'langgraph' LangGraph not installed pip install langgraph>=0.4.1
ModuleNotFoundError: No module named 'pydantic_settings' pydantic-settings missing pip install pydantic-settings>=2.9.1
ImportError: cannot import name 'Interval' from 'utils' Running from wrong working directory Run from repo root so src is on the path
AssertionError on primary_interval Config primary_interval not in signals.intervals Ensure primary_interval value appears in signals.intervals list

Compatibility Notes

  • Python version: Requires Python >= 3.12. Older versions (3.10, 3.11) will fail due to requires-python constraint.
  • Windows: Terminal color codes use colorama which auto-initializes; os.system("cls") is used for screen clearing on Windows.
  • Cache directory: The ./cache/ directory is created relative to the working directory; ensure write permissions.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment