Skip to content

Libraries

TradAI shared Python libraries (namespace: tradai.*).

Overview

Library Purpose
tradai-common Base classes, entities, AWS utilities, exceptions
tradai-data Market data fetching (CCXT/Binance), ArcticDB storage
tradai-strategy Strategy framework, validation, metadata

Architecture

All libraries follow the 3-layer architecture:

libs/tradai-*/
├── src/tradai/*/
│   ├── api/            # Presentation layer (if applicable)
│   ├── core/           # Business logic, entities, protocols
│   └── infrastructure/ # External adapters, repositories
└── tests/
    ├── unit/
    └── integration/

Note: The 3-layer structure (api/, core/, infrastructure/) applies to services. Libraries have varied structures -- see individual library docs for details.

Installation

Libraries are installed as workspace dependencies:

# Add library dependency to a package
just add-dep services/backend tradai-common

Technical Design

For detailed architecture decisions and implementation details, see Technical Design.

See Also