# Prompts

Paste one into Claude Code, Codex, Cursor or any coding agent, in an empty folder or your own project. Each one starts by giving the agent Rizon's context, and lets it get its own key: you approve one link.

## Starter

Any idea: Rizon's context, a key, then your bot.

```text
I want to build something on Rizon, a paper-money Bitcoin exchange with a public API.

1. Fetch https://rizon.markets/CLAUDE.md, save it as CLAUDE.md in this project, and follow it.
2. If RIZON_API_KEY isn't set, get a key with Rizon's connect flow (CLAUDE.md explains it): show me the link to approve, then save the key to .env and make sure .env is gitignored.
3. Then build this: <describe what you want>

Use Python unless this project already uses something else. Keep it small and readable, and tell me how to run it.
```

## Data collector

Every price, book and trade into SQLite, with backfill after gaps.

```text
Build a Rizon data collector. First fetch https://rizon.markets/CLAUDE.md, save it as CLAUDE.md here and follow it. Market data needs no key, so the collector runs without one.

- Connect to wss://rizon.markets/api/v1/ws with the channels price:BTC-USD, books and trades, and write everything to SQLite (rizon.db): prices (t, price, live), book snapshots (t, market, best bid and ask with their sizes, and the whole ladder as JSON), and trades (every field; a trade arrives again when it settles, so upsert by id).
- On start and after every reconnect, backfill: GET /api/v1/prices/BTC-USD for the price gap (the server keeps 20 minutes), GET /api/v1/trades page by page until you reach trades already stored, and GET /api/v1/trades/:id for each stored trade that's still open, so settlements you missed are caught.
- Reconnect with exponential backoff, write in one transaction per second, and never store duplicates, even across restarts.
- Print one status line every 30 seconds: messages per second, rows written, last price, and whether it's live.
- Add a report script that prints, per market: trade count, total size, how much size each side took (the trade's taker), how often the market maker (the account on the most trades) is on each side, and how often up won.

Python, with the websockets package and the standard sqlite3 module. Tell me how to run it in the background.
```

## BTC market maker

Two-sided quotes on BTC-15s, skewed by inventory, that measure who they trade with.

```text
Build a market maker for Rizon's BTC-15s market. First fetch https://rizon.markets/CLAUDE.md, save it as CLAUDE.md here and follow it, including the connect flow if RIZON_API_KEY isn't set.

- Quote tif "post" limit orders around BTC spot from the price:BTC-USD channel: 3 levels a side, $20 each, one strike apart, the best of them at the book's best bid and ask (the market maker's quotes, centred on spot, 2 strikes wide). It re-posts on every re-quote, so this puts you ahead of it for other traders' market orders. But it runs next to the exchange and trades through any quote its new quotes cross, so quotes at the top mostly fill right after the price moves against them.
- Re-quote on every price event that moves your levels, at most 3 times a second: one POST /api/v1/orders/batch with the ids of the quotes that moved in cancel and their replacements in orders. Leave quotes that haven't moved alone, so they keep their place. Never cross your own quotes. A quote refused with 409 post-only order would trade (the book trails the price a little) is skipped until the next event.
- Inventory: net = open up size minus open down size over your open positions, starting from hello and kept by id from position events (a position is open until its result is set). Shift both sides against net by 1 strike per $100, and stop quoting the side that would take it past $300 either way.
- Every 10 seconds, log: resting orders per side, open positions per side, realised PnL, and fills so far, split by who was on the other side: the market maker (the account on the most trades), or anyone else (from the trades channel; a position's id is its trade's id).
- Pause when the price isn't live, when the session's realised PnL is below -$200, or after 5 errors in a row. On Ctrl-C, cancel the orders it placed (by id, so it never touches orders I place by hand) before exiting.

Python with asyncio, websockets for the stream and httpx for orders. Put the parameters (sizes, levels, skew, limits) in a config block at the top, and explain in plain words what it does once it's running, and what the split between the market maker and everyone else says about the quotes.
```

## Momentum trader

Buys the direction of a sharp move, with a dry run first.

```text
Build a momentum trader for Rizon. First fetch https://rizon.markets/CLAUDE.md, save it as CLAUDE.md here and follow it, including the connect flow if RIZON_API_KEY isn't set.

- Watch the price:BTC-USD channel. Every second, measure the BTC move over the last 10 seconds in units of BTC-15s's sigma from GET /api/v1/markets (refreshed every 30 s).
- Past 1.5 sigma, buy that direction at market on BTC-15s: up after a rise, down after a fall. $25 a trade, one open position at a time, and a 5-second pause after each settlement.
- Log every trade to a CSV: time, side, strike, spot at entry, the move in sigmas, settle price, result, PnL. After each settlement, print the running win rate and PnL.
- Stop for the day after 5 losses in a row or -$150, and pause whenever the price isn't live.
- Add a --dry-run flag that logs the signals without trading, and a --threshold option.

Python. Tell me how to run it and how to read the log.
```

## Copy trader

Mirrors the top of the leaderboard at a fraction of their size.

```text
Build a copy trader for Rizon. First fetch https://rizon.markets/CLAUDE.md, save it as CLAUDE.md here and follow it, including the connect flow if RIZON_API_KEY isn't set.

- Every minute, read GET /api/v1/leaderboard and follow the top 3 by PnL with at least 20 settled positions (wins + losses + pushes), never yourself.
- Watch the trades channel. When one of them opens a position (they're the up or down party of a new trade), take the same side in the same market at market, at 10% of their size (at least $1, at most $50).
- Skip a copy that would be more than 2 seconds late, and everything while the price isn't live. Never hold more than $200 open.
- Log each copy beside the original (their strike and yours), and print how the copies of each leader are doing.

TypeScript on Bun or Node 22, with the built-in fetch and WebSocket. Tell me how to run it.
```

## Live dashboard

Your positions on a live chart, with equity, PnL and the book.

```text
Build a live dashboard for my Rizon account. First fetch https://rizon.markets/CLAUDE.md, save it as CLAUDE.md here and follow it. If RIZON_API_KEY isn't set, get a key with the connect flow, asking for scope read: the dashboard only reads.

One web page, served by a tiny local server:
- A live BTC chart: the last 10 minutes from GET /api/v1/prices/BTC-USD, then the price:BTC-USD channel. Draw my open positions on it as lines at their strikes, ending at their expiry, bright while in the money and dim while not.
- Balance, equity, realised PnL, win rate and rank, live from account events.
- The BTC-15s book, top 5 levels a side, and the last 20 trades on the exchange.
- An equity curve from my settled positions (GET /api/v1/positions?status=settled, following next).

The API allows any origin, so the page can call it directly. It runs only on my machine: keep the read key in a gitignored config.js, send it as the Authorization header on REST calls, and as ?key= on the WebSocket URL (browsers can't set WebSocket headers). Plain HTML, CSS and JavaScript, no build step.
```

## Analyst

What's working in your trading, from your history and the tape.

```text
Analyse my Rizon trading. First fetch https://rizon.markets/CLAUDE.md, save it as CLAUDE.md here and follow it. If RIZON_API_KEY isn't set, get a key with the connect flow, asking for scope read.

- Pull all my settled positions (GET /api/v1/positions?status=settled, following next until it's null) and a few thousand recent trades from the tape (GET /api/v1/trades) into pandas.
- For me: win rate and PnL by market and side; by the strike's distance from spot at entry (in dollars, and in sigmas using today's sigma per market from GET /api/v1/markets); by hour of day; streaks; and the PnL curve.
- For the exchange: how often up wins in each market, how often the market maker (the account on the most trades) takes each side, and the typical strike distance from spot.
- Save the charts as PNGs and write REPORT.md: what stands out, and what I might change.

Python with requests, pandas and matplotlib, as a script I can rerun.
```
