kraken-alert-patterns
Price alerts, threshold monitoring, and notification triggers for agents.
Paper-trading sandbox over workspace sessions: record live market data and agent decisions inside a session window, replay and score it later.
Claude Code
$ npx -y skills add krakenfx/kraken-cli --skill kraken-playground --agent claude-code
Codex
$ npx skills add krakenfx/kraken-cli --skill kraken-playground -a codex -y
Cursor
$ npx skills add krakenfx/kraken-cli --skill kraken-playground -a cursor -y
Gemini CLI
$ npx skills add krakenfx/kraken-cli --skill kraken-playground -a gemini-cli -y
GitHub Copilot
$ npx skills add krakenfx/kraken-cli --skill kraken-playground -a github-copilot -y
OpenCode
$ npx skills add krakenfx/kraken-cli --skill kraken-playground -a opencode -y
Windsurf
$ npx skills add krakenfx/kraken-cli --skill kraken-playground -a windsurf -y
name: kraken-playground
version: 2.0.0
description: "Paper-trading sandbox over workspace sessions: record live market data and agent decisions inside a session window, replay and score it later."
metadata:
openclaw:
category: "finance"
requires:
bins: ["kraken"]A session ties a market recorder and the workspace's paper account to one window. Live prices stream in and get recorded as the session's tape, paper orders fill against those prices on the shared account journal, and every decision is logged, so the window can be replayed and analyzed later. No real order is ever placed inside a paper workspace.
Use this skill for:
`kraken playground` is the fastest way in: it creates (or reuses, never re-funding) a paper workspace named `playground` with 10,000 USD, prints how to watch it, and starts a recorded, self-stopping demo session:
kraken playground --symbols BTC/USD --for 1h 2>/dev/null & export KRAKEN_WORKSPACE=playground
Everything it makes is a plain workspace plus a session — the commands below drive it like any other scope.
A session is a recorded window over the active scope's account journal. One session id (`s1`, `s2`, …) binds three things: the recorder (live market data to `sessions/s<n>/tape.*`), the window markers on the account journal (which trades belong to the session), and the session's decision log (the "why" behind each action). There is no daemon and no shared memory between rounds. State lives on disk, and each round reads what it needs.
The CLI has no scheduler and runs no strategy. It records, fills paper orders, and logs. The agent decides, and something external holds the pace (see Pacing).
Work inside a paper workspace (create one once with `kraken workspace create <name> --capital 10000 --mode paper`), then:
export KRAKEN_WORKSPACE=<name> kraken session start \ --symbols BTC/USD --channels ticker,trade --to duckdb,jsonl \ --label my-hypothesis-r1 \ -o json 2>/dev/null &
The `session_started` JSON line on stdout carries the session id (`"session":"s<n>"`). **Print it to the user as soon as the session starts, and again in the final report.** It is the handle for everything after: `kraken session show --session s<n>`, resuming a `/loop`, and locating the artifacts under `sessions/s<n>/`.
Buy or sell against recorded prices — the order verbs are mode-routed, so inside a paper workspace they fill on the paper account. Name the workspace on every order: an exported `KRAKEN_WORKSPACE` does not reach a later shell, such as a `/loop` fire, and without a workspace `kraken order buy` trades the real account. Always pass a reason; it lands in the active session's decision log:
kraken --workspace <name> order buy BTC/USD <volume> --type market --reason "<why>" -o json 2>/dev/null kraken --workspace <name> order sell BTC/USD <volume> --type market --reason "<why>" -o json 2>/dev/null
Log a non-trade decision (a skip, a gate, an alert) so the log records rounds where nothing traded:
kraken session note --kind skip --symbol BTC/USD --reason "<why>" -o json 2>/dev/null
Data lands under the session directory of the active scope:
# Read the decision log (evidence) and the typed state cell (the loop's # cursor: round, legs_done, zone, last_action_at) through the CLI — # no layout knowledge needed: kraken session decisions --session s<n> -o json kraken session state get --session s<n> -o json
Pacing is external to the CLI. Two mechanisms, one per hypothesis shape:
For time-gated runs, the interval is a floor. A round may start late (the scheduler adds jitter), never early. Do not add a second pacing gate inside the round; `/loop` already enforces spacing.
**The scheduler floor is 60 seconds.** `/loop`, cron, and `ScheduleWakeup` all clamp to a one-minute minimum, so `interval_s` must be `>= 60` and a sub-minute cadence is impossible. If the user asks for "every 30 seconds", clamp to 60s and say so — never set a sub-minute `interval_s`, and never let the report claim a cadence the harness cannot run.
A session over many rounds is interventional: one visit per interval, paced from outside. Pick the mechanism by what triggers a decision.
Trade on Kraken from your terminal, or let your AI agent trade for you. One install covers crypto, tokenized U.S. stocks and ETFs (for non-U.S. customers), forex, and futures. Every command can answer in JSON.
Price alerts, threshold monitoring, and notification triggers for agents.
Progress from manual trading to full agent autonomy with controlled risk at each level.
Capture the spot-futures price spread with delta-neutral basis trades.
Dollar cost averaging with scheduled buys and performance tracking.
Discover staking strategies, allocate funds, and track earn positions.
Handle order failures, network errors, and duplicate submissions safely.
Complete, populate and fill out 3-statement financial model templates (Income Statement, Balance Sheet, Cash Flow Statement) .…
Complete, populate and fill out 3-statement financial model templates (Income Statement, Balance Sheet, Cash Flow Statement) .…