Build Packs
    Claude Code
    Intermediate

    Crypto Trading OS

    a paper trading desk: Gemini researches, Claude proposes, jev judges, fixed rules decide, you approve

    Cover art for the Crypto Trading OS Build Pack
    Setup 30 to 45 minutes, then eleven prompts over a few evenings
    $0 to start: demo mode and jev's free demo need no account beyond Claude Code; subscriptions, API keys and OpenRouter are optional
    11 prompts
    v1.0.1
    claude-code
    docker
    python
    fastapi
    sqlite
    openrouter

    Build a paper crypto trading desk in Docker. A council of AIs researches, proposes and judges each trade, a fixed-rule Risk Gate has the last word, Codex tunes the strategy on data it never saw, and you approve. Eleven prompts, demo mode for every agent, no real money anywhere.

    What you build

    PartWhat it isWhat it does
    Paper brokerLive public Coinbase prices and a simulated $10,000 account with feesOpens and closes paper positions and checks stops and targets every minute. No exchange key exists anywhere.
    Risk GateFixed rules in plain code, no AICaps size, loss at the stop, exposure, daily loss and trades per day. Shrinks or blocks every idea, and checks again when you approve.
    The councilGemini researches, Claude proposes, jev judgesEach speaks once per proposal and writes its line in the log. jev answers approve, reduce or reject with probabilities.
    Codex strategy labCodex proposes strategy settingsBacktest code scores them on history Codex never saw and keeps the old settings if the new ones lose.
    DashboardA dark trading screen and an AI connections pageShows the council at work, positions and limits; you pick demo, subscription, API or OpenRouter per agent.
    Safety net11 tests, a smoke script and a panic buttonFails the build if the usual order calls appear; one command runs a whole loop; one button closes everything.

    Where this comes from

    This is an original system, designed and built for AI Automation Base. It started as a question: what would a trading desk look like if every AI on it had one job, and the one with the final word had no AI in it at all? We drew the screens, built a working version in Docker, ran it, and then wrote it back out as eleven prompts so you can build your own.

    It stands on public tools that belong to their owners: Claude Code, Codex, Gemini CLI, OpenRouter, Ollama, Coinbase's public price API, and TypeSafe's jev model with its System One protocol, including a free public jev demo endpoint.

    What you build

    A paper crypto trading desk that runs in one Docker container on your own machine. Every hour, or when you press Analyze, a council meets: Gemini reads the last day of news and writes a short sentiment note, Claude turns the prices and the note into one trade idea or says hold, and jev answers with a typed decision (approve, reduce or reject) with probabilities and a risk score. Then the Risk Gate, plain code with fixed limits, passes it, shrinks it or blocks it. The trade waits for your click, and the gate checks it again at the moment you approve.

    On the side, Codex works the strategy lab: it proposes new settings for the one strategy in the system, and backtest code scores them on the 30 percent of history Codex was never shown. If the new settings lose there, the old ones stay. A panic button closes everything and stops new trades until you resume.

    Every agent can run four ways: demo (canned answers, no account), your own subscription through the official command-line tool, an API key, or OpenRouter (which also covers Ollama on your own machine). jev runs on its free public demo, on your own GPU, or on the paid TypeSafe service.

    The one thing it deliberately does not do: trade real money. There is no exchange account, no exchange key and no order-placing code, and a test fails the build if the usual order calls appear. Moving to real money is not in this lesson.

    Do you need this? Be honest first

    This is for someone who wants to see how several models can share one decision without any of them being in charge, and who wants a working example of a hard rule layer around AI output. Trading is the subject because it makes the gates obvious: every number has a limit and every limit is visible.

    It is not a way to make money, and nothing in it predicts a market. If you want a bot that trades for you, this is the wrong pack. If you have never used Docker, the setup path gets you there, but expect the first evening to go on setup. This is not financial advice.

    What you need

    • A laptop: Windows 10/11 with WSL2, a Mac with Apple Silicon, or Linux. Docker Desktop on Windows and Mac (check its licence terms if you use it at work), Docker Engine on Linux.
    • Claude Code on your own Anthropic account. It builds the app with you.
    • Nothing else to start. Demo mode and jev's free demo run the whole loop with no other account. Later, optionally: your Claude, ChatGPT (for Codex) or Google subscription, API keys, an OpenRouter key, or a TypeSafe key.
    • Time: setup 30 to 45 minutes, then eleven prompts over a few evenings.

    What is in the zip

    crypto-trading-os/
      README.md          the lesson: what you build, the rule that never bends, the paths
      index.html         the clickable setup guide with every prompt and a copy button
      COSTS.md           every cost, with where to check it
      CREDITS.md         where it comes from, what was verified, terms
      DISCLAIMER.md      as is, no warranty, use at your own risk
      assets/cover.png   the lesson image
      paths/             Windows WSL2, Mac Apple Silicon, Linux Omarchy, from a clean machine
      prompts/           eleven prompts, 00 to 10
    

    What was verified and what was not

    Verified on 2026-10-24: a reference build of the same design ran in Docker with 11 unit tests passing, the smoke script printing SMOKE OK, live public prices, jev's free demo answering, the full council in demo mode (propose, judge, gate, approve, paper fill, a double approval refused), the Codex lab adopting settings that beat the old ones on unseen data, and the panic button closing a position and blocking the next approval. The clickable guide was driven by a script in a real Chromium; every text file was scanned for keys, private addresses and mailboxes before the zip was built; and a second model (Codex) reviewed the pack in two read-only passes, 9 and 4 findings, with each one's fate recorded.

    Not verified: the eleven prompts run in order on a fresh machine; the three setup paths on three fresh machines; Claude, Codex and Gemini with real subscriptions, API keys or OpenRouter; jev on a local GPU or on paid TypeSafe (its endpoint address comes from public sources that disagree, so confirm it in TypeSafe's docs); Ollama as the endpoint. When something breaks, paste the whole error into Claude Code and ask it to fix it, then post what broke in the community.

    Read the prompt before you run it

    Hand each prompt to Claude first and ask what it plans to build. Compare that with the proof line at the end of the prompt. A prompt costs a minute to fix. A Risk Gate that lets the wrong trade through teaches you the wrong lesson, even on paper.

    More packs