DEV Community

Cover image for 🚀 Kraken xStocks AI Trading Agent — Autonomous Finance with MeDo
Michael G. Inso
Michael G. Inso

Posted on

🚀 Kraken xStocks AI Trading Agent — Autonomous Finance with MeDo

🚀 Kraken xStocks AI Trading Agent — Autonomous Finance with MeDo

Inspiration

The challenge was clear: build an autonomous AI agent capable of trading tokenized U.S. stocks and ETFs (xStocks) on Kraken. We wanted to push beyond simple bots and create a system that combines multi‑strategy analysis, risk management, and transparent execution — all powered by MeDo’s no‑code AI platform.

What It Does

  • 📊 Strategy Backtesting Mode — replay historical price data to validate trading ideas without touching live trades.
  • 📈 Multi‑day Portfolio Equity Curve — visualize P&L trends directly on the dashboard.
  • 🛡️ Risk Controls — per‑trade position limits and daily drawdown circuit‑breakers.
  • 🔄 Autonomous Trading Cycle — hourly Supabase Edge Function executes trades with stop‑loss/take‑profit automation.
  • 🌐 Live Market Feeds — Kraken REST API integration for real‑time xStock prices.
  • 🖥️ Interactive Dashboard — heatmaps, trade history with AI reasoning panels, and portfolio snapshots.

How We Built It

  • Supabase for realtime data, pg_cron scheduling, and secure storage.
  • Kraken CLI + REST API for execution and live price feeds.
  • Gemini 2.5 Flash for AI‑powered market analysis and sentiment search.
  • React + TailwindCSS for a dark‑themed professional trading terminal.
  • MeDo AI Platform to orchestrate workflows and modular enhancements.

Challenges

Balancing risk management with autonomy was the hardest part. Implementing circuit‑breakers and position limits ensured the agent could survive volatility while still learning from backtests.

Accomplishments

  • End‑to‑end autonomous trading agent with full audit logging.
  • Real‑time dashboards that make AI reasoning transparent.
  • A scalable foundation for future multi‑asset expansion.

What’s Next

We plan to extend the agent with:

  • 🧠 Reinforcement learning for adaptive strategies.
  • 🌍 Multi‑exchange support beyond Kraken.
  • 📹 Livestreamed trading sessions to engage the community.

💡 Check out the live project here: https://app-bqd26w3w579d.appmedo.com/

🔗 Join the conversation and share your feedback — building in public is part of the challenge!

Top comments (0)