SkillAgentSearch skills...

The0

Open Source Algorithmic Trading Engine

Install / Use

/learn @alexanderwanyoike/The0
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

the0

<div align="center">

Open-Source Algorithmic Trading Platform

Production-grade bot execution engine for quantitative trading

License: Apache 2.0 Docker Python TypeScript Rust C++ C# Scala Haskell Artifact Hub

</div>

What is the0?

the0 is an open-source algorithmic trading execution engine that provides production-grade infrastructure for deploying and managing trading bots across multiple markets. Build strategies in your preferred language—Python, TypeScript, Rust, C++, C#, Scala, or Haskell—then deploy them to a self-hosted execution engine with real-time monitoring and custom React dashboards.

Status: Beta - Active development. Not production-ready. Contributions and feedback welcome.

Key Features

  • Multi-Language Support - Build bots in Python, TypeScript, Rust, C++, C#, Scala, or Haskell
  • Custom Frontends - Create React dashboards tailored to your trading strategies
  • Real-time Execution - Deploy scheduled or continuous trading bots with isolated execution
  • Self-Hosted - Full control over your infrastructure and data
  • Docker Ready - Streamlined deployment with Docker Compose
  • CLI-First Workflow - Efficient bot management via command-line interface
  • Exchange Agnostic - Design your bots to work with any trading platform

Quick Start

Deploy the0 locally:

Prerequisites

  • Docker 20.10+ with Compose plugin (the CLI uses Docker Compose under the hood)
  • At least 4GB RAM available for containers

Option 1: CLI Local Deployment (Recommended)

# Install the CLI
curl -sSL https://install.the0.app | sh

# Start all services
the0 local start

# Access the platform
open http://localhost:3001  # Frontend
open http://localhost:3000  # API
open http://localhost:9001  # MinIO Console (admin/the0password)

Option 2: Kubernetes (Helm)

# Install from the Helm repository
helm repo add the0 https://alexanderwanyoike.github.io/the0
helm repo update
helm install the0 the0/the0 --namespace the0 --create-namespace

Local development with Minikube:

cd k8s
make minikube-up
make setup-hosts

See k8s/README.md for full Kubernetes deployment documentation.


CLI Installation

The the0 CLI tool provides a local development interface for managing your bots.

Quick Install (Recommended)

curl -sSL https://install.the0.app | sh

This detects your OS and architecture, downloads the latest release binary, verifies its checksum, and installs it to ~/.the0/bin/the0. Make sure ~/.the0/bin is in your PATH.

Install from Source

# Clone the repository if you haven't already
git clone https://github.com/alexanderwanyoike/the0.git
cd the0/cli

# Build and install the CLI
make install

# Verify installation
the0 --help

The source build installs to ~/bin/the0. Make sure ~/bin is in your PATH.

Prerequisites for CLI

  • Go 1.21+ - Required for building the CLI
  • Git - For cloning the repository

CLI Configuration & Usage

Configure API endpoint for local deployments:

# For Docker Compose deployment
export THE0_API_URL=http://localhost:3000

# For Kubernetes deployment  
export THE0_API_URL=http://api.the0.local:3000

For CLI bot usage instructions, visit the official documentation:

📖 the0 CLI Documentation


MCP Server (Claude Code Integration)

the0 includes a built-in MCP (Model Context Protocol) server that enables AI assistants like Claude Code to interact directly with the platform. This allows you to manage bots, view logs, and deploy configurations using natural language.

Configure Claude Code

MCP tools require authentication via API key. Generate one from the web dashboard (Settings → API Keys) or via the CLI (the0 auth login).

Option 1: CLI Command

claude mcp add the0 --transport http http://localhost:3000/mcp \
  --header "x-api-key: YOUR_API_KEY"

Option 2: Configuration File

Add to your .mcp.json in the project root:

{
  "mcpServers": {
    "the0": {
      "type": "http",
      "url": "http://localhost:3000/mcp",
      "headers": {
        "x-api-key": "YOUR_API_KEY"
      }
    }
  }
}

For team environments, use environment variable expansion to avoid committing secrets:

{
  "mcpServers": {
    "the0": {
      "type": "http",
      "url": "http://localhost:3000/mcp",
      "headers": {
        "x-api-key": "${THE0_API_KEY}"
      }
    }
  }
}

Restart Claude Code after configuring, then verify with /mcp — you should see the0 server as connected.

Available MCP Tools

| Category | Tool | Description | |----------|------|-------------| | Auth | auth_status | Check API key validity | | Bot Instance | bot_list | List deployed bots | | | bot_get | Get bot details | | | bot_deploy | Deploy a new bot | | | bot_update | Update bot configuration | | | bot_delete | Delete a bot | | Logs | logs_get | Get execution logs | | | logs_summary | Get log statistics | | Custom Bot | custom_bot_list | List available custom bots | | | custom_bot_get | Get custom bot details | | | custom_bot_schema | Get configuration schema |

Example Usage

Once configured, ask Claude Code:

  • "List my deployed bots"
  • "Show me the logs for my trading bot"
  • "What custom bots are available?"
  • "Deploy a new scheduled bot with this configuration"

For detailed MCP documentation including all tool parameters and troubleshooting, see MCP Integration Guide.


Architecture

the0 is built as a microservices execution engine that enables algorithmic trading bot deployment and management:

graph TB
    subgraph "Users"
        DEV[👨‍💻 Bot Developer<br/>Creates & tests bots]
        TRADER[📊 Trader<br/>Deploys & monitors]
    end
    
    subgraph "the0 Platform"
        subgraph "Client Layer"
            WEB[🌐 Web Dashboard<br/>Next.js 15, React 19<br/>Bot management & monitoring]
            CLI[🛠️ CLI Tool<br/>Go, Cobra<br/>Local development]
        end
        
        subgraph "API Layer"
            API[🚀 API Server<br/>NestJS, TypeScript<br/>REST API & orchestration]
        end
        
        subgraph "Runtime Services"
            BR[⚡ Bot Runner<br/>Go, gRPC<br/>Real-time execution]
            BS[⏰ Bot Scheduler<br/>Go, gRPC<br/>Cron execution]
        end

        subgraph "Data Layer"
            PG[(🐘 PostgreSQL<br/>Users, bots, auth)]
            MONGO[(🍃 MongoDB<br/>Runtime state, logs)]
            NATS[📨 NATS JetStream<br/>Event streaming]
            MINIO[📦 MinIO<br/>Code & log storage]
        end
    end
    
    %% User interactions
    DEV -.->|HTTPS| WEB
    DEV -.->|CLI| CLI
    TRADER -.->|HTTPS| WEB
    
    %% Client to API
    WEB -->|REST + JWT| API
    CLI -->|REST + API Key| API
    API -->|SSE| WEB
    
    %% API to databases
    API -->|SQL| PG
    API -->|Events| NATS
    API -->|S3 API| MINIO
    
    %% Runtime services
    NATS -->|Events| BR
    NATS -->|Events| BS

    BR -->|State| MONGO
    BS -->|Schedules| MONGO

    BR -->|Logs| MINIO
    
    %% Styling
    classDef userClass fill:#e1f5fe,stroke:#0277bd,stroke-width:2px
    classDef clientClass fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
    classDef apiClass fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
    classDef runtimeClass fill:#fff8e1,stroke:#f57c00,stroke-width:2px
    classDef dataClass fill:#e0f2f1,stroke:#00695c,stroke-width:2px

    class DEV,TRADER userClass
    class WEB,CLI clientClass
    class API apiClass
    class BR,BS runtimeClass
    class PG,MONGO,NATS,MINIO dataClass

How It Works

🌐 Web Dashboard - Next.js frontend for bot management, real-time monitoring, and documentation system

🛠️ CLI Tool - Go-based command-line interface for local bot development, testing, and deployment automation

🚀 API Server - NestJS backend providing REST APIs, JWT authentication, and event orchestration across all services

⚙️ Runtime Services - Specialized Go microservices using master-worker patterns for different execution models:

  • Bot Runner: Real-time trading bot execution
  • Bot Scheduler: Cron-based scheduled execution

💾 Data Architecture - Multi-database approach:

  • PostgreSQL: User accounts, bot definitions, authentication
  • MongoDB: Runtime state, job queues, execution logs
  • MinIO: Bot code storage and logs
  • NATS JetStream: Event streaming and service coordination

Key Benefits

  • Isolated: Each bot runs in isolation with resource management
  • Fast: Real-time execution with live market data
  • Scalable: Handles multiple bots and users across distributed infrastructure

Bot Development

Supported Languages

Build trading bots in any of these languages with official SDK support:

| Language | SDK | Documentation | Package Registry | |----------|-

View on GitHub
GitHub Stars216
CategoryFinance
Updated13h ago
Forks27

Languages

TypeScript

Security Score

100/100

Audited on Apr 6, 2026

No findings