Skip to content
项目

关于

开源算法交易引擎

商业与金融

这些数字如何统计

实测星标增长

24小时
+1
7天
+4
15天
+5
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文
the0 logo

the0

Run your trading bots like production software.

A self-hosted runtime for algorithmic trading. Write a bot in the language you already use;
the0 runs it, schedules it, keeps its state, streams its logs and gives it a live dashboard.

License: Apache 2.0 Release Artifact Hub Discord

Docs · Quick start · Build a bot · Discord


You've tested a strategy on your laptop. Now it has to run every day, survive restarts, remember its positions between runs and tell you what it's doing. That last mile is ops work, and it's the same for every bot. the0 is that last mile, built once:

Runtime Every bot runs in its own isolated container, in Python, TypeScript, Rust, C++, C#, Scala or Haskell.
Scheduling Run bots continuously, or on a cron schedule per instance.
State Key-value state that survives between runs and restarts.
Logs & metrics Structured logs and metrics from every run, live in the browser and queryable from the CLI and API.
Dashboards Ship a React dashboard with your bot and watch its metrics update in real time.

Backtesting stays local, next to your research. the0 is where a strategy goes once it's ready to trade.

Quick start

You need Docker with the Compose plugin and about 4 GB of free memory.

curl -sSL https://install.the0.app | sh   # installs the CLI to ~/.the0/bin
the0 local init                            # prompts for the admin email and password
the0 local start

Open http://localhost:3001 and sign in. The API listens on http://localhost:3000.

Then build and deploy your first bot in the language of your choice.

This quick start uses Docker Compose, which is only for local development and evaluation. For a server, install the Helm chart on Kubernetes:

helm repo add the0 https://alexanderwanyoike.github.io/the0

Languages

Language SDK Guide
Python the0-sdk on PyPI Quick start
TypeScript / Node.js the0-node on npm Quick start
Rust the0-sdk on crates.io Quick start
C++ Header-only, via FetchContent Quick start
C# The0.Sdk on NuGet Quick start
Scala GitHub Packages Quick start
Haskell From source with cabal Quick start
React dashboards the0-react on npm Custom frontends

Working examples for each language live in example-bots/.

Built for AI agents too

The API ships an MCP server, so Claude Code or any MCP client can list, deploy and debug your bots. Create an API key in the dashboard, then:

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

How it fits together

flowchart LR
    Clients["CLI, dashboard, MCP"] --> API
    API -- NATS --> Runner[Bot runner]
    API -- NATS --> Scheduler[Bot scheduler]
    Runner --> Bots[[Your bots]]
    Scheduler --> Bots

The API is NestJS, the runtime and CLI are Go, and the dashboard is Next.js. PostgreSQL holds users and bot definitions, MongoDB holds runtime state, NATS carries events, and an S3-compatible store holds bot code and logs. Bots run as Docker containers under Compose, or as pods and CronJobs on Kubernetes.

Upgrading? Every breaking change ships with a migration guide.

Contributing

Bug reports, ideas and pull requests are all welcome, AI-assisted ones included as long as they come with tests. Start with CONTRIBUTING.md, or say hello on Discord.

License

Apache 2.0


Built by AlphaNeuron · the0.app

This one's for you Dad

探索相关项目

加载中…