Paper-quote five levels each side, then promote to live
1. Pick your attribution string
Every order you send carries an attribution field. Use a stable, reverse-DNS-style id (e.g.mm-foo-stratA). Attribution is the only identity in Phase A — your books, fills, and PnL are keyed on it.
2. Quote both sides (Python loop)
import time, requests, json
API = "https://api.taifoon.dev"
ATTR = "mm-foo-stratA"
MARKET = "BTC-PERP"
while True:
depth = requests.get(f"{API}/book/v1/depth/{MARKET}").json()
best_bid = float(depth["bids"][0]["price"])
best_ask = float(depth["asks"][0]["price"])
mid = (best_bid + best_ask) / 2
# 5 bid levels, 5 ask levels, 6 bps spacing
for i in range(5):
bid_px = round(mid * (1 - (5 + i*6) / 1e4), 2)
ask_px = round(mid * (1 + (5 + i*6) / 1e4), 2)
for side, px in (("buy", bid_px), ("sell", ask_px)):
requests.post(
f"{API}/book/v1/orders",
json={
"market": MARKET, "side": side,
"qty": "0.05", "price": str(px),
"tif": "gtc", "attribution": ATTR,
},
)
time.sleep(2)
# Cancel any unfilled quotes before re-pricing
requests.delete(f"{API}/book/v1/orders?attribution={ATTR}")3. Read your fills
Fills are server-side queryable by market. Client-side filter by your attribution to isolate your own prints:
curl -s 'https://api.taifoon.dev/book/v1/fills?market=BTC-PERP&attribution=mm-foo-stratA&limit=200'
?attribution= is a prefix-match server-side filter: attribution=mm-foo- returns all fills whose attribution starts with that string. Both maker and taker fills for your attribution are included.4. Score yourself (paper)
Resolve each fill against your running inventory. A profitable maker fill is one where the print price is better than mid at t_placed. Track:
- Fills per hour (target: > 20 across both sides).
- Maker ratio (target: > 90%; market crosses are taker fills).
- Realised + unrealised PnL per attribution string.
- Win rate over rolling 24h (target: ≥ 85%).
5. Promote to LIVE
Once you clear the 24h gate (WR ≥ 85% on n_fills ≥ 30), flip your asset to live indata/asset_trading_modes.json on the matcher host (the matcher hot-reloads within 60s):
{
"BTC-PERP": {
"mode": "LIVE",
"venue": "kraken-futures",
"promoted_at": "2026-05-17T...Z",
"attribution": "mm-foo-stratA"
}
}LIVE mode routes your POST /book/v1/orders through the matcher and then forwards the cross to Kraken Futures (or Drift, for SOL). Every fill is stamped execution_mode: LIVE in the receipt.
