Skip to content

About

DogKrakenAgent: supervised DOG strategy dashboard with multi-agent AI council, Kraken CLI paper trading, futures hedge, and Bitcoin L1/CEX arbitrage.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DogKrakenAgent

A supervised AI wealth pipeline for DOG on Kraken.

DogKrakenAgent, also called DOG MarketMind in the CLI and dashboard, is a Kraken Agent Zero submission by @dogdamassa. It turns a DOG holder's capital into a structured plan with long-term accumulation, profit capture, tactical trading, defensive futures hedging, and cross-venue arbitrage monitoring between Kraken and Bitcoin L1.

The design follows the clear submission style of dogofbitcoin/dog-ai, but this is a separate TypeScript project with its own strategy engine, sleeve accounting, Kraken CLI bridge, futures hedge flow, and React dashboard.

This project runs in Kraken paper mode by default. It is software for experimentation and contest judging, not financial advice.

The Pitch

Most trading bots answer one question: "Should I buy or sell now?"

DogKrakenAgent answers a better question: "Where should each dollar live, and what is it allowed to do?"

The user chooses a playbook, deposits capital, and the system splits every buy into three spot sleeves:

  • HODL - a write-only long-term vault, locked by code.
  • REALIZE - a profit-taking sleeve that sells after strong pumps.
  • TRADE - a smaller tactical sleeve controlled by the AI council.
  • HEDGE - a dynamic Kraken Futures paper short on PF_DOGUSD that can defend HODL gains without selling spot DOG.

Four agents then monitor the market:

  • Macro reads BTC price, BTC dominance, and broad crypto regime.
  • On-chain reads DOG holder concentration, whale flow, and DOG Bitcoin L1 data from dogdata.xyz.
  • Orderbook reads Kraken DOG/USD book depth, walls, spread, and slippage.
  • Risk speaks last, can veto, and is the only agent allowed to propose executable actions.

The user still has final control: the dashboard shows the council's decision and the user clicks Accept or Skip.

What Judges Can Try

git clone https://github.com/dogdamassa/DogKrakenAgent.git
cd DogKrakenAgent
npm install
npm run build
cp .env.example .env
npx marketmind serve

Open http://localhost:7777.

If the Kraken CLI is installed and initialized, the app uses real Kraken paper trading. If it is not installed, the full flow still runs with simulated fills, clearly tagged in the ledger, while using live DOG and macro data where available.

Demo Flow

  1. Start the dashboard.
  2. Choose Top Dog, deposit $100, and save the plan.
  3. Click Allocate or run npx marketmind allocate.
  4. Watch the $100 split into HODL / REALIZE / TRADE.
  5. Run a council cycle.
  6. Read Macro, On-chain, Orderbook, and Risk.
  7. Accept only if Risk proposes a non-veto action.
  8. Open the Arbitrage panel to compare Kraken vs Dogswap L1.
  9. Open Backtest to compare Diamond Paws, Top Dog, and Alpha Hunter across historical DOG candles.

Strategy Playbooks

Each preset is a full playbook, not just an allocation.

Preset Best For HODL / REALIZE / TRADE Profit Trigger Defensive Hedge Council Cadence
Diamond Paws Larger deposits, long horizon, few decisions 80 / 15 / 5 REALIZE at +50% Short 30% of HODL after HODL +30% 1x/day
Top Dog Balanced default, monthly DCA 60 / 25 / 15 REALIZE at +35% Short 25% of HODL after HODL +40% 3x/day
Alpha Hunter Smaller budgets, active monitoring 40 / 30 / 30 REALIZE at +20% Short 15% of HODL after HODL +50% Hourly

The counter-intuitive rule is intentional: small budgets often fit Alpha Hunter better because its smallest non-zero sleeve is 30%, which keeps each Kraken paper order above the assumed $5 minimum. Diamond Paws needs larger deposits because its 5% TRADE sleeve gets too small otherwise.

Safety Model

DogKrakenAgent is built around one invariant:

HODL cannot be sold by the council.

That rule is enforced in three places:

  • The Risk zod schema only allows trade, realize, or hedge.
  • runDogCouncil throws if a risk verdict targets HODL.
  • /api/council/accept executes only the sleeve emitted by Risk and never accepts HODL.

Risk can:

  • hold and do nothing.
  • buy into TRADE.
  • realize part of REALIZE after the strategy trigger.
  • hedge_open a defensive PF_DOGUSD short.
  • hedge_close the short on retrace or stop-loss.
  • veto the cycle.

Kraken CLI Integration

The project wraps Kraken CLI calls through packages/core/src/kraken.ts.

Used command surfaces include:

Area Commands
Market data kraken ticker, kraken orderbook, kraken ohlc, kraken trades, kraken spread
Spot paper kraken paper init, status, balance, positions, history, orders, buy, sell, reset
Futures paper kraken futures paper init, status, balance, positions, set-leverage, sell, buy
Runtime probe kraken --version

For contest demos, every successful Kraken paper call is persisted to .marketmind/ledger.jsonl with source: "kraken". If the CLI is missing, the executor falls back to source: "simulated" so the dashboard remains reviewable on any machine.

Cross-Venue Arbitrage

The arb detector compares:

  • Kraken DOG/USD price from Kraken CLI, falling back to dogdata.xyz.
  • Dogswap Bitcoin L1 DOG price, falling back to dogdata.xyz.
  • The user's Kraken spot DOG inventory.
  • The user's declared L1 DOG inventory.

When the spread exceeds the configured threshold, the dashboard surfaces:

  • sell venue,
  • buy venue,
  • maximum DOG size,
  • gross spread profit,
  • fee estimate,
  • net profit estimate.

The Kraken leg can execute against paper trading. The Dogswap leg is simulated until a Bitcoin L1 wallet integration is added.

Dashboard

The Vite/React dashboard shows:

  • onboarding strategy cards with minimum viable deposit math,
  • current market context,
  • next scheduled DCA buy,
  • sleeve balances and PnL,
  • live council cards,
  • pending accept/reject action,
  • advisory briefings,
  • Kraken orderbook walls,
  • arbitrage opportunity,
  • backtest matrix,
  • trade and council history,
  • short chat interface when ANTHROPIC_API_KEY is set.

Architecture

packages/
  core/       KrakenBridge, KrakenExecutor, sleeve ledger, PnL, strategies,
              dogdata client, macro fetcher, backtest, arbitrage, DCA programs
  agents/     zod schemas, system prompts, runDogCouncil orchestrator
  server/     Express API, SSE broadcaster, advisory scheduler, dashboard hosting
  dashboard/  Vite + React dashboard
  cli/        marketmind init/strategy/allocate/dca/council/status/history/chat/serve

Runtime state is local and ignored by git:

.marketmind/
  config.json
  ledger.jsonl
  councils.jsonl
  programs.json
  arbs.jsonl

Live Data Sources

  • Kraken CLI for DOG/USD price, orderbook, OHLC, paper spot trades, and paper futures.
  • dogdata.xyz for DOG Bitcoin L1 holder stats, whale alerts, Dogswap price, and market data.
  • CoinGecko for BTC dominance, BTC price, DOG aggregate price, and DOG volume.
  • Anthropic Claude is optional. Without ANTHROPIC_API_KEY, the council uses a deterministic rule-based mock composed from live signals.

CLI Reference

npx marketmind strategy
npx marketmind init --strategy top_dog --deposit 100 --mode lump
npx marketmind allocate
npx marketmind init --strategy top_dog --deposit 400 --mode dca --amount 100 --buys 1 --days sun --force
npx marketmind dca
npx marketmind council
npx marketmind council --accept
npx marketmind status
npx marketmind history -n 20
npx marketmind chat
npx marketmind serve -p 7777

Environment

ANTHROPIC_API_KEY=
KRAKEN_CLI_MODE=native
KRAKEN_BIN=kraken
PORT=7777

On Windows with WSL2 and Kraken installed inside WSL:

KRAKEN_CLI_MODE=wsl
KRAKEN_BIN=kraken

Documentation

Repository

Submission repo:

https://github.com/dogdamassa/DogKrakenAgent

License

MIT. See LICENSE.

Credits

  • Kraken and Kraken Pro for the Agent Zero contest and the Kraken CLI.
  • DOG community and dogdata.xyz for the DOG Bitcoin L1 data layer.
  • dogofbitcoin/dog-ai for the public-submission documentation style that inspired this README structure.
  • Anthropic for optional Claude-powered council analysis.

About

DogKrakenAgent: supervised DOG strategy dashboard with multi-agent AI council, Kraken CLI paper trading, futures hedge, and Bitcoin L1/CEX arbitrage.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages