DEV Community

Paarthurnax
Paarthurnax

Posted on

How to Build a Free Crypto Portfolio Tracker with AI Alerts (No Coding Required)

How to Build a Free Crypto Portfolio Tracker with AI Alerts (No Coding Required)

⚠️ Disclaimer: This article is for educational purposes only and does not constitute financial advice. Crypto markets are volatile. Always do your own research before making any investment decisions.

If you've spent any time in crypto, you know the pain: prices move fast, you're juggling five tabs, three apps, and a spreadsheet held together with prayers. What if your own AI agent watched your portfolio 24/7 and tapped you on the shoulder the moment something moved?

That's exactly what we're building here — a crypto portfolio tracker with AI 2026 that runs locally, costs nothing in subscriptions, and pings you on Telegram when your coins start doing something interesting.

No Python scripts. No servers to configure. No cloud subscriptions. Just you, your laptop, and a local AI agent doing the heavy lifting.


What You'll Build

By the end of this guide, you'll have:

  • Live price tracking for any coins you hold, powered by the free CoinGecko API
  • A local AI agent that monitors your portfolio and interprets market moves
  • Telegram alerts sent to your phone whenever a coin crosses a threshold you set
  • Optional: a paper trading log to test strategies without risking real money

The platform we'll use is OpenClaw — a local AI agent framework designed to run powerful automations on your own machine, without sending your data to anyone else's cloud.


Step 1 — Get Your Free CoinGecko API Key

CoinGecko offers a generous free tier that covers everything we need: live prices, market cap, 24h change, and historical data.

  1. Go to coingecko.com and create a free account.
  2. Navigate to Developer Dashboard → API Keys.
  3. Generate a new key and copy it somewhere safe (a text file on your desktop works fine for now).

The free plan allows up to 30 calls per minute — more than enough for a personal portfolio tracker checking prices every few minutes.

Test it works by opening your browser and visiting:

https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd&x_cg_demo_api_key=YOUR_KEY_HERE
Enter fullscreen mode Exit fullscreen mode

You should see a clean JSON response with current BTC and ETH prices. If you do, you're ready to move on.


Step 2 — Set Up OpenClaw as Your Local AI Agent Platform

OpenClaw is the engine that ties everything together. It runs locally on your machine and lets you build AI agents that can call APIs, watch conditions, and trigger actions — all without writing code yourself.

  1. Grab the OpenClaw Home AI Agent bundle — it comes pre-configured with everything you need, including agent skills for web APIs and messaging.
  2. Follow the setup guide included with your download. It takes about 10 minutes on a standard Windows or Mac machine.
  3. Once running, open the OpenClaw workspace. You'll see a chat interface — this is how you talk to your agent.

The key advantage of OpenClaw here is that your portfolio data never leaves your machine. You're not pasting your holdings into some SaaS dashboard that may or may not sell your data. Everything runs locally, the AI reasons locally, and only the alert message gets sent out (to Telegram, which you control).


Step 3 — Define Your Portfolio

In the OpenClaw workspace, create a new file called portfolio.json. This is your source of truth — what coins you hold and at what quantities.

Here's an example format:

{
  "portfolio": [
    { "coin": "bitcoin", "symbol": "BTC", "amount": 0.05 },
    { "coin": "ethereum", "symbol": "ETH", "amount": 1.2 },
    { "coin": "solana", "symbol": "SOL", "amount": 10 },
    { "coin": "chainlink", "symbol": "LINK", "amount": 50 }
  ],
  "currency": "usd",
  "alert_thresholds": {
    "price_change_pct": 5,
    "portfolio_value_change_pct": 3
  }
}
Enter fullscreen mode Exit fullscreen mode

The alert_thresholds section tells the agent when to bother you:

  • price_change_pct: 5 → alert if any single coin moves ±5% in the last hour
  • portfolio_value_change_pct: 3 → alert if your total portfolio value shifts ±3%

Adjust these to your own risk tolerance. If you're holding stablecoins, lower the threshold. If you're deep in meme coins and volatility is your middle name, raise it.


Step 4 — Connect the CoinGecko API to Your Agent

Now we wire OpenClaw to CoinGecko so your agent can fetch live prices on a schedule.

In your OpenClaw workspace, open the agent configuration and tell your agent (in plain English — no code):

"Every 5 minutes, call the CoinGecko API using my key to fetch current prices for the coins in my portfolio.json file. Calculate the total portfolio value in USD. Compare the current prices to the prices from 1 hour ago. If any coin has moved more than my threshold percentage, flag it."

OpenClaw's local AI will interpret this instruction, use the CoinGecko skill to make the API calls, do the maths, and hold the result in memory for the next step.

You can also ask it to show you a snapshot at any time by just chatting:

"What's my portfolio worth right now?"

And it'll pull fresh prices and calculate your total value on the spot. No app switching. No refreshing dashboards.


Step 5 — Set Up Telegram Alerts

This is where it gets genuinely useful. Instead of checking prices obsessively, you let the agent check and only hear from it when something matters.

Create your Telegram bot:

  1. Open Telegram and search for @botfather.
  2. Send /newbot and follow the prompts to name your bot.
  3. Copy the bot token BotFather gives you.
  4. Send your new bot a message (any message — this activates your chat ID).
  5. Visit https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates to find your chat ID in the response.

Configure alerts in OpenClaw:

Add your bot token and chat ID to a secure config file in your workspace:

{
  "telegram": {
    "bot_token": "YOUR_BOT_TOKEN",
    "chat_id": "YOUR_CHAT_ID"
  }
}
Enter fullscreen mode Exit fullscreen mode

Then tell your agent:

"When a portfolio alert triggers, send a Telegram message to my configured bot with the coin name, current price, percentage change, and a brief AI summary of what's happening."

The "brief AI summary" part is where the local AI earns its keep. Instead of getting a cold BTC -6.2% notification, you'll get something like:

🔴 BTC Alert — Bitcoin has dropped 6.2% in the last hour to $58,400. This follows a broader market sell-off. Your BTC position is now worth $2,920. Portfolio total: $14,830 (↓3.1% from last check).

Context. Not just noise.


Step 6 — Optional: Add Paper Trading Logs

If you want to test strategies without actual money on the line, OpenClaw can maintain a paper trading journal for you.

Just tell your agent:

"Track a paper trade: I'm buying 0.1 ETH at today's price. Log this with the timestamp and create a simple P&L tracker."

Your agent will create and update a paper-trades.md file in your workspace, showing entry price, current price, and unrealised profit/loss each time you check in. Great for testing a DCA strategy, an altcoin rotation play, or just getting a feel for market timing before committing real funds.


What This Setup Actually Gets You

Let's be honest about what you're building here versus what you're not building:

Feature This Setup Paid Platforms
Live prices ✅ Free via CoinGecko ✅ Bundled
AI analysis ✅ Local, private Sometimes
Telegram alerts ✅ Free, your bot Often paid tier
Data privacy ✅ 100% local ❌ Cloud-stored
Monthly cost $0 $10–$50/mo
Customisability ✅ Full control Limited

The trade-off is setup time — maybe 30–60 minutes versus signing up for a SaaS and clicking around. But you own it. You control it. And it gets smarter the more you use it, because your local AI learns the context of your portfolio over time.


Get Started Today

The fastest way to get this running is with the OpenClaw Home AI Agent bundle, which comes with pre-built agent skills for API calls, Telegram messaging, file management, and local AI reasoning — everything covered in this guide, ready to go.

Grab it, follow the steps above, and you could have your first Telegram alert landing on your phone before the end of the afternoon.


Crypto markets move fast. Your tools should too.

⚠️ Reminder: Nothing in this article is financial advice. This is a technical tutorial for building personal tools. Always do your own research and never invest more than you can afford to lose.

Top comments (0)