kraken-dca-strategy

Dollar cost averaging with scheduled buys and performance tracking.

23 stars

Best use case

kraken-dca-strategy is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Dollar cost averaging with scheduled buys and performance tracking.

Teams using kraken-dca-strategy should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/kraken-official-dca-strategy/SKILL.md --create-dirs "https://raw.githubusercontent.com/jiayaoqijia/cryptoskill/main/skills/exchanges/kraken-official-dca-strategy/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/kraken-official-dca-strategy/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How kraken-dca-strategy Compares

Feature / Agentkraken-dca-strategyStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Dollar cost averaging with scheduled buys and performance tracking.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# kraken-dca-strategy

Use this skill for:
- implementing a recurring buy strategy at fixed intervals
- tracking average cost basis over time
- comparing DCA performance against lump-sum entry
- running DCA simulations in paper mode first

## Core Concept

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.

## Paper DCA Loop (Test First)

Always validate the strategy in paper mode before going live.

The `paper buy` command takes base-asset volume, not dollar amount. Calculate volume first:

```bash
kraken paper init --balance 10000 --currency USD -o json 2>/dev/null

# Calculate BTC volume for a $100 buy at current price
PRICE=$(kraken ticker BTCUSD -o json 2>/dev/null | jq -r '.[].c[0]')
VOLUME=$(echo "scale=8; 100 / $PRICE" | bc)

# Simulate weekly buys
kraken paper buy BTCUSD $VOLUME -o json 2>/dev/null
kraken paper status -o json 2>/dev/null

# Repeat buy, check status each iteration
kraken paper buy BTCUSD $VOLUME -o json 2>/dev/null
kraken paper status -o json 2>/dev/null

kraken paper history -o json 2>/dev/null
```

## Live DCA Single Buy

Each interval, the agent executes one market buy for the fixed amount:

1. Check current price:
   ```bash
   kraken ticker BTCUSD -o json 2>/dev/null
   ```
2. Calculate volume from dollar amount (e.g., $100 at current price):
   ```bash
   PRICE=$(kraken ticker BTCUSD -o json 2>/dev/null | jq -r '.[].c[0]')
   VOLUME=$(echo "scale=8; 100 / $PRICE" | bc)
   ```
3. Validate the order:
   ```bash
   kraken order buy BTCUSD $VOLUME --type market --validate -o json 2>/dev/null
   ```
4. Execute (requires human approval):
   ```bash
   kraken order buy BTCUSD $VOLUME --type market -o json 2>/dev/null
   ```
5. Log the trade for cost basis tracking.

## Cost Basis Tracking

After each buy, query trade history to compute running average:

```bash
kraken trades-history --consolidate-taker -o json 2>/dev/null
```

The agent should maintain a running total:
- Total invested (sum of all dollar amounts)
- Total units acquired (sum of all volumes)
- Average cost = total invested / total units
- Current value = total units * current price
- Unrealized P&L = current value - total invested

## Limit-Order DCA Variant

Instead of market buys, place limit orders slightly below the current price for better fills:

```bash
PRICE=$(kraken ticker BTCUSD -o json 2>/dev/null | jq -r '.[].b[0]')
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:

```bash
kraken open-orders -o json 2>/dev/null
kraken order cancel <UNFILLED_TXID> -o json 2>/dev/null
```

## Multi-Asset DCA

Split a fixed budget across multiple assets (e.g., 60% BTC, 30% ETH, 10% SOL):

```bash
# $100 total: $60 BTC, $30 ETH, $10 SOL
# Calculate volumes for each, then place orders sequentially
```

## Scheduling

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).

## Hard Rules

- Never execute live DCA buys without explicit human approval for the strategy and per-trade confirmation (unless operating at autonomy level 4+).
- Always paper-test the DCA loop first.
- Track cost basis after every buy; do not lose history.
- Cancel stale limit orders before placing new ones to avoid duplicate exposure.

Related Skills

Kraken Crypto Skill

23
from jiayaoqijia/cryptoskill

Use the kraken_cli.py wrapper to query your Kraken account.

openclaw_kraken

23
from jiayaoqijia/cryptoskill

Use a Bash CLI to query Kraken Spot and Futures APIs, inspect account state, run guarded trading and funding actions, and work with Kraken websocket payloads using OpenClaw-managed secrets.

kraken-ws-streaming

23
from jiayaoqijia/cryptoskill

Real-time data streaming via WebSocket for spot and futures.

kraken-twap-execution

23
from jiayaoqijia/cryptoskill

Execute large orders as time-weighted slices to reduce market impact.

kraken-tax-export

23
from jiayaoqijia/cryptoskill

Export trade history, ledgers, and cost basis data for tax reporting.

kraken-subaccount-ops

23
from jiayaoqijia/cryptoskill

Create and manage subaccounts with inter-account transfers.

kraken-stop-take-profit

23
from jiayaoqijia/cryptoskill

Manage stop-loss and take-profit orders for risk-bounded positions.

kraken-spot-execution

23
from jiayaoqijia/cryptoskill

Execute spot orders with validation, confirmation gates, and post-trade checks.

kraken-shared

23
from jiayaoqijia/cryptoskill

Shared runtime contract for kraken-cli: auth, invocation, parsing, and safety.

kraken-risk-operations

23
from jiayaoqijia/cryptoskill

Operational risk controls for live agent trading sessions.

recipe-paper-strategy-backtest

23
from jiayaoqijia/cryptoskill

Backtest a trading strategy using paper trading against live prices.

kraken-rebalancing

23
from jiayaoqijia/cryptoskill

Portfolio rebalancing to maintain target allocations across assets.