0
the0BETA
BETA

the0
Self-hosted execution engine
for algorithmic trading bots

Run bots in isolated containers. Schedule or stream execution. Bring your own strategy code and libraries. Self-hosted, open-source (Apache 2.0).

8090100110120130RSI-ALPHA+$2,849VOL-BREAK$-307MOMENTUM+$5,613
Live
RSI-ALPHALONG
VOL-BREAKSHORT
MOMENTUMLONG
RSI-ALPHA
LONG

P/L (USD)

+2,848.99

Win Rate

72.0%

TRADES: 156ACTIVE
VOL-BREAK
SHORT

P/L (USD)

-307.49

Win Rate

58.0%

TRADES: 89ACTIVE
MOMENTUM
LONG

P/L (USD)

+5,613.22

Win Rate

80.9%

TRADES: 234ACTIVE

Why developers use it

Open source execution engine built for developers who want control.

100%
Customizable

Code First Approach

Bring your own strategy code and libraries. In Python or JavaScript.

100%
Isolated

Container Isolation

Each bot runs in its own isolated container.

Minutes
To Deploy

Quick Development and Deployment

Deploy bots in minutes with minimal setup.

2
Modes

Scheduled or Realtime

Cron-based or continuous strategies.

Build Your First Trading Bot

Create a bot with 4 simple files

1
Bot Logic
Python
main.py

DCA bot using Alpaca for trading

1"""
2DCA Bot - Dollar Cost Averaging with Alpaca
3A scheduled bot that executes recurring purchases.
4"""
5
6import structlog
7from typing import Dict, Any
8from alpaca.trading.client import TradingClient
9from alpaca.trading.requests import MarketOrderRequest
10from alpaca.trading.enums import OrderSide, TimeInForce
11
12structlog.configure(
13    processors=[
14        structlog.processors.TimeStamper(fmt="iso"),
15        structlog.processors.JSONRenderer()
16    ]
17)
18logger = structlog.get_logger()
19
20
21def main(id: str, config: Dict[str, Any]) -> Dict[str, Any]:
22    """Bot entry point - called on each scheduled run."""
23    api_key = config["api_key"]
24    secret_key = config["secret_key"]
25    symbol = config.get("symbol", "BTC/USD")
26    amount = config.get("amount", 100)
27    paper = config.get("paper", True)
28
29    logger.info("bot_started", bot_id=id, symbol=symbol, amount=amount)
30
31    # Initialize Alpaca client
32    client = TradingClient(api_key=api_key, secret_key=secret_key, paper=paper)
33
34    # Execute DCA purchase
35    order = MarketOrderRequest(
36        symbol=symbol,
37        notional=amount,
38        side=OrderSide.BUY,
39        time_in_force=TimeInForce.DAY
40    )
41    result = client.submit_order(order_data=order)
42
43    # Emit trade metric
44    logger.info(
45        "order_executed",
46        _metric="trade",
47        symbol=symbol,
48        side="buy",
49        amount=amount,
50        order_id=str(result.id)
51    )
52
53    return {
54        "status": "success",
55        "message": f"Purchased ${amount} of {symbol}",
56        "data": {"order_id": str(result.id)}
57    }
Step 1 of 4

Get Started in Minutes

Prerequisites: Docker 20.10+ | 4GB RAM | Git | Go 1.21+

Docker Compose
Recommended
# Clone and start
git clone https://github.com/alexanderwanyoike/the0.git
cd the0/docker && make up

# Access the0
open http://localhost:3001  # Dashboard
open http://localhost:3000  # API

Cloud deployments coming soon.

Under the Hood

Microservices architecture designed for high-performance bot execution

Web Dashboard
Next.js 15
CLI Tool
Go, Cobra
API Server
NestJS
Bot Runner
Go
Scheduler
Go
PostgreSQL
API Data
MongoDB
Runtime State
MinIO
Bot Code
NATS
Events
Data Layer Connections
Service
Postgres
MongoDB
MinIO
NATS
API
Runner
Scheduler
100%
Container Isolated
7
Languages Supported
K8s
Ready to Scale