0
the0BETA

the0
Open source algorithmic
trading platform

Create, deploy, and manage trading bots with ease. Whether you're building a simple DCA strategy or complex multi-asset arbitrage algorithms, the0 provides the infrastructure and tools you need.

Get Started in Minutes

Get the0 running locally in under 5 minutes with Docker Compose or try our experimental Kubernetes deployment.

Prerequisites

Docker 20.10+

Docker and Docker Compose 2.0+ (for platform deployment)

4GB RAM

At least 4GB RAM available for containers (platform only)

Git

For cloning the repository

Go 1.21+

Required for building the CLI tool

Choose Your Deployment Method

Docker Compose
Recommended

Get running locally in under 5 minutes

# Clone the repository
git clone https://github.com/alexanderwanyoike/the0.git
cd the0

# Start all services
cd docker
make up

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

Cloud deployments will be available in the future.

Build Your First Trading Bot

A complete Dollar Cost Averaging bot with just a few files. We will be language agnostic - use any libraries you prefer.

Project Files
main.py
Python

Core bot logic with Alpaca integration

1from typing import Dict, Any
2import logging
3from datetime import datetime
4from alpaca.trading.client import TradingClient
5from alpaca.trading.requests import MarketOrderRequest
6from alpaca.trading.enums import OrderSide, TimeInForce
7
8# Configure logging
9logging.basicConfig(level=logging.INFO)
10logger = logging.getLogger(__name__)
11
12def main(id: str, config: Dict[str, Any]) -> Dict[str, Any]:
13    """
14    Main DCA bot execution function using Alpaca.
15    
16    Args:
17        id: Unique bot instance ID
18        config: Bot configuration from user
19        
20    Returns:
21        Dict with execution status and results
22    """
23    logger.info(f"Starting DCA bot {id}")
24    
25    try:
26        # Extract configuration
27        api_key = config["api_key"]
28        secret_key = config["secret_key"]
29        paper = config.get("paper", True)
30        symbol = config["symbol"]
31        amount = config["amount"]
32        
33        # Initialize Alpaca trading client
34        client = TradingClient(
35            api_key=api_key,
36            secret_key=secret_key,
37            paper=paper
38        )
39        
40        # Calculate and execute purchase
41        order = MarketOrderRequest(
42            symbol=symbol,
43            notional=amount,
44            side=OrderSide.BUY,
45            time_in_force=TimeInForce.DAY
46        )
47        
48        result = client.submit_order(order_data=order)
49        
50        return {
51            "status": "success",
52            "message": f"Purchased ${amount} of {symbol}",
53            "order_id": str(result.id)
54        }
55        
56    except Exception as e:
57        logger.error(f"Bot execution failed: {e}")
58        return {
59            "status": "error",
60            "message": str(e),
61            "timestamp": datetime.now().isoformat()
62        }

Language Agnostic

We will be language agnostic. Use Python, JavaScript, or any runtime with your favorite libraries and frameworks.

Type-Safe Configuration

JSON Schema validation ensures your bot configuration is always correct.

Real-time Execution

Deploy scheduled or continuous bots with live market data integration.

Built for Scale and Reliability

Microservices architecture designed for high-performance trading bot execution with built-in security and monitoring.

Client Layer

User interfaces and development tools

Web Dashboard

Bot management & monitoring

Next.js 15, React 19

CLI Tool

Local development interface

Go, Cobra

API Layer

REST APIs and orchestration

API Server

REST APIs & orchestration

NestJS, TypeScript

Runtime Services

Core execution and processing services

Bot Runner

Real-time bot execution

Go, gRPC

Backtest Runner

Historical strategy testing

Go, gRPC

Bot Scheduler

Cron-based execution

Go, gRPC

Supporting Services

Security and analysis services

Security Analyzer

Code analysis & validation

Python, YARA

AI Assistant

Bot development & deployment help

FastAPI, Google ADK
Data Flow

Secure by Design

Built-in security analysis, isolated execution, and comprehensive audit logging.

High Performance

Optimized Go runtime services with event-driven architecture for low-latency trading.

Auto Scaling

Customizable autoscaling based on the overall number of bots per worker. Kubernetes-ready microservices adapt to your trading load.

Data Infrastructure

Multi-database architecture optimized for different data types and access patterns.

PostgreSQL

User accounts, bot definitions, and structured data storage.

MongoDB

Runtime state and dynamic bot data.

MinIO

S3-compatible storage for bot code, files, artifacts, and execution logs.

NATS JetStream

Event streaming and message coordination between services.

Why Choose the0

Open source algorithmic trading platform built for developers and traders

Custom Bot Development

Build trading bots in Python or JavaScript with any libraries you prefer. We will be language agnostic giving you complete flexibility.

Custom Backtesting

Implement your own backtesting logic using any libraries you prefer. Test strategies with historical data before going live.

Real-time Execution

Deploy scheduled or continuous trading bots with live market data. Support for both cron-based and event-driven execution models.

Docker Ready

Easy deployment with Docker Compose. Get the entire platform running locally in under 5 minutes with a single command.

Multi Language Support

Currently supports Python and JavaScript. Coming soon: TypeScript, Rust, C++, and C#. Theoretically supports any programming language.

Exchange Agnostic

Design your bots to work with any trading platform. Connect to multiple exchanges and brokers through standardized APIs.