kraken-alert-patterns
Price alerts, threshold monitoring, and notification triggers for agents.
Dollar cost averaging with scheduled buys and performance tracking.
Claude Code
$ npx -y skills add krakenfx/kraken-cli --skill kraken-dca-strategy --agent claude-code
Codex
$ npx skills add krakenfx/kraken-cli --skill kraken-dca-strategy -a codex -y
Cursor
$ npx skills add krakenfx/kraken-cli --skill kraken-dca-strategy -a cursor -y
Gemini CLI
$ npx skills add krakenfx/kraken-cli --skill kraken-dca-strategy -a gemini-cli -y
GitHub Copilot
$ npx skills add krakenfx/kraken-cli --skill kraken-dca-strategy -a github-copilot -y
OpenCode
$ npx skills add krakenfx/kraken-cli --skill kraken-dca-strategy -a opencode -y
Windsurf
$ npx skills add krakenfx/kraken-cli --skill kraken-dca-strategy -a windsurf -y
name: kraken-dca-strategy
version: 1.0.0
description: "Dollar cost averaging with scheduled buys and performance tracking."
metadata:
openclaw:
category: "finance"
requires:
bins: ["kraken"]Use this skill for:
Dollar cost averaging buys a fixed dollar amount of an asset at regular intervals regardless of price. This reduces timing risk and smooths entry cost over volatile periods.
Always validate the strategy in paper mode before going live.
The `paper buy` command takes base-asset volume, not dollar amount. Calculate volume first:
kraken workspace create sandbox --capital 10000 --mode paper --currency USD -o json 2>/dev/null export KRAKEN_WORKSPACE=sandbox # Calculate BTC volume for a $100 buy at current price PRICE=$(kraken ticker BTCUSD -o json 2>/dev/null | jq -r '.[].last_price') VOLUME=$(echo "scale=8; 100 / $PRICE" | bc) # Simulate weekly buys kraken paper buy BTCUSD $VOLUME -o json 2>/dev/null kraken workspace status -o json 2>/dev/null # Repeat buy, check status each iteration kraken paper buy BTCUSD $VOLUME -o json 2>/dev/null kraken workspace status -o json 2>/dev/null kraken paper history -o json 2>/dev/null
Live orders run outside the paper workspace, so run `unset KRAKEN_WORKSPACE` first. Inside it, the buy fills on paper and `trades-history --consolidate-taker` is refused.
Each interval, the agent executes one market buy for the fixed amount:
1. Check current price:
kraken ticker BTCUSD -o json 2>/dev/null
2. Calculate volume from dollar amount (e.g., $100 at current price):
PRICE=$(kraken ticker BTCUSD -o json 2>/dev/null | jq -r '.[].last_price') VOLUME=$(echo "scale=8; 100 / $PRICE" | bc)
3. Validate the order:
kraken order buy BTCUSD $VOLUME --type market --validate -o json 2>/dev/null
4. Execute (requires human approval):
kraken order buy BTCUSD $VOLUME --type market -o json 2>/dev/null
5. Log the trade for cost basis tracking.
After each buy, query trade history to compute running average:
kraken trades-history --consolidate-taker -o json 2>/dev/null
The agent should maintain a running total:
Instead of market buys, place limit orders slightly below the current price for better fills:
PRICE=$(kraken ticker BTCUSD -o json 2>/dev/null | jq -r '.[].bid_price') LIMIT=$(echo "scale=2; $PRICE * 0.998" | bc) VOLUME=$(echo "scale=8; 100 / $LIMIT" | bc) kraken order buy BTCUSD $VOLUME --type limit --price $LIMIT -o json 2>/dev/null
Check fill status at the next interval. Cancel unfilled orders before placing new ones:
kraken open-orders -o json 2>/dev/null kraken order cancel <UNFILLED_TXID> -o json 2>/dev/null
Split a fixed budget across multiple assets (e.g., 60% BTC, 30% ETH, 10% SOL):
# $100 total: $60 BTC, $30 ETH, $10 SOL # Calculate volumes for each, then place orders sequentially
The CLI does not include a built-in scheduler. Agents should use external scheduling (cron, task scheduler, or the agent's own loop timer) to trigger DCA buys at the chosen interval (daily, weekly, bi-weekly, monthly).
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.
Discover staking strategies, allocate funds, and track earn positions.
Handle order failures, network errors, and duplicate submissions safely.
Minimize trading fees through maker orders, volume tiers, and fee-aware execution.
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) .…