kraken-alert-patterns
Price alerts, threshold monitoring, and notification triggers for agents.
Execute large orders as time-weighted slices to reduce market impact.
Claude Code
$ npx -y skills add krakenfx/kraken-cli --skill kraken-twap-execution --agent claude-code
Codex
$ npx skills add krakenfx/kraken-cli --skill kraken-twap-execution -a codex -y
Cursor
$ npx skills add krakenfx/kraken-cli --skill kraken-twap-execution -a cursor -y
Gemini CLI
$ npx skills add krakenfx/kraken-cli --skill kraken-twap-execution -a gemini-cli -y
GitHub Copilot
$ npx skills add krakenfx/kraken-cli --skill kraken-twap-execution -a github-copilot -y
OpenCode
$ npx skills add krakenfx/kraken-cli --skill kraken-twap-execution -a opencode -y
Windsurf
$ npx skills add krakenfx/kraken-cli --skill kraken-twap-execution -a windsurf -y
name: kraken-twap-execution
version: 1.0.0
description: "Execute large orders as time-weighted slices to reduce market impact."
metadata:
openclaw:
category: "finance"
requires:
bins: ["kraken"]
skills: ["kraken-spot-execution"]Use this skill for:
Time-Weighted Average Price (TWAP) splits a large order into N equal slices executed at regular intervals. The goal is to achieve an average price close to the time-weighted market average, reducing the impact a single large order would have on the book.
kraken workspace create sandbox --capital 50000 --mode paper -o json 2>/dev/null export KRAKEN_WORKSPACE=sandbox # Simulate 5 slices of 0.01 BTC each, 60s apart kraken paper buy BTCUSD 0.01 -o json 2>/dev/null # wait 60s kraken paper buy BTCUSD 0.01 -o json 2>/dev/null # wait 60s kraken paper buy BTCUSD 0.01 -o json 2>/dev/null # repeat... kraken paper history -o json 2>/dev/null kraken workspace status -o json 2>/dev/null
The agent runs this loop externally (the CLI does not have a built-in scheduler). As written, the loop sends every slice without asking anyone, so run it only at autonomy level 4+. Below that, run one validated slice per approved call and wait the interval between calls. Live orders run outside the paper workspace, so clear it first:
unset KRAKEN_WORKSPACE TOTAL_VOLUME=0.05 SLICES=5 SLICE_VOL=$(echo "scale=8; $TOTAL_VOLUME / $SLICES" | bc) INTERVAL=60 for i in $(seq 1 $SLICES); do kraken order buy BTCUSD $SLICE_VOL --type market --validate -o json 2>/dev/null || break # A failure prints its envelope here; on "verify_first": true, check open-orders before any retry. kraken order buy BTCUSD $SLICE_VOL --type market -o json 2>/dev/null || break [ $i -lt $SLICES ] && sleep $INTERVAL done
Use limit orders at the current best bid/ask for potentially better fills:
PRICE=$(kraken ticker BTCUSD -o json 2>/dev/null | jq -r '.[].ask_price') kraken order buy BTCUSD $SLICE_VOL --type limit --price $PRICE -o json 2>/dev/null
Check fill status before the next slice. Cancel unfilled orders and adjust:
kraken open-orders -o json 2>/dev/null
After all slices, compute the volume-weighted average price from trade history:
kraken trades-history --consolidate-taker -o json 2>/dev/null
Sum (price * volume) for each fill, divide by total volume filled.
The CLI does not pre-throttle requests. If a slice submission hits a rate limit, the error includes a `suggestion` field with tier-specific limits and a `docs_url` pointing to Kraken's documentation. On `rate_limit` error, pause the loop, read the suggestion, and adjust the interval before resuming. A 60-second interval between slices is well within budget for all tiers. For shorter intervals, consult the `kraken-rate-limits` skill for per-tier counter costs and decay rates.
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) .…