Why I Automated My BTC Buys
I used to set a weekly reminder to buy Bitcoin. Every Sunday, open the exchange app, market buy $50, done.
Then I’d forget. Or I’d see the price pumping and think “I’ll wait for a dip.” Or the price was crashing and I’d freeze up. Classic mistake — I was turning a mechanical strategy into an emotional one.
So I handed it to an AI.
Here’s what a simple $50/week BTC DCA would have returned if you started at various points:
| Start Date | Total Invested | Portfolio Value (Feb 2026) | ROI |
|---|---|---|---|
| Jan 2022 (pre-crash!) | ~$10,550 | ~$25,300 | +140% |
| Jan 2023 (post-bottom) | ~$8,100 | ~$17,800 | +120% |
| Jan 2024 | ~$5,600 | ~$8,100 | +45% |
Calculated using historical BTC weekly closing prices via dcabtc.com. Past performance doesn’t guarantee future results.
The key insight: even if you started DCA right before the 2022 crash (BTC went from $47K down to $16K), you’d still be up 140% today. That’s the entire point of DCA — it doesn’t matter when you start.
The hard part isn’t the strategy. It’s the discipline to keep buying. That’s where OpenClaw comes in.
What Is OpenClaw (and Why Use It for This)?
OpenClaw is an open-source AI agent that runs locally on your computer. You talk to it in plain English — through Telegram, Discord, WhatsApp, or your browser — and it executes tasks for you.
For trading, that means: you tell it “buy $50 of BTC every Monday morning” and it handles the rest. No dashboards, no cron jobs, no code.
Why OpenClaw instead of an exchange’s built-in DCA feature?
- Cross-exchange: One bot, multiple exchanges. Most exchange DCA features lock you into their platform.
- Flexible logic: “Buy more when the price drops 10%” — try telling Binance’s auto-invest that.
- Privacy: Your keys stay on your machine. Nothing is sent to a third-party server.
- Extensible: Start with DCA today, add grid trading tomorrow. Same tool.
Scam warning: There is NO official OpenClaw token. Any $CLAWD or $OPENCLAW token you see is a scam. OpenClaw is free, open-source software.
Step 1: Install OpenClaw
Already have OpenClaw installed? Skip to Step 2 →
You’ll need Node.js 22+ on your machine. If you’re not sure, open your terminal and run node -v. If you see v22.x.x or higher, you’re good.
Mac or Linux
Open Terminal and run:
curl -fsSL https://openclaw.ai/install.sh | bash
The installer (from the official OpenClaw site) will:
- Detect your OS and architecture
- Install OpenClaw globally
- Launch the onboarding wizard
When the wizard asks about channels (Telegram, Discord, etc.), you can skip this for now — we’ll use the browser UI first.
Windows
Open PowerShell as Administrator:
iwr -useb https://openclaw.ai/install.ps1 | iex
Windows users: OpenClaw works best under WSL2. If you don’t have WSL2 set up, follow Microsoft’s guide first, then install OpenClaw inside your WSL2 terminal using the Mac/Linux command above.
Alternative: Install via npm
If you prefer npm:
npm install -g openclaw@latest
openclaw onboard --install-daemon
Mac users: If you get a
sharpbuild error, run:SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest
Verify Installation
Run these two commands:
openclaw gateway status
You should see the gateway is running. Then open the browser UI:
openclaw dashboard
This opens http://127.0.0.1:18789/ — you should see the OpenClaw chat interface. If you see it, you’re ready.
Step 2: Connect Your Exchange
Already have API keys configured? Skip to Step 3 →
You need API keys from one of these exchanges. Pick whichever you already have an account on.
Option A: Binance
- Log into Binance
- Go to Account → API Management
- Click Create API → System Generated
- Name it
openclaw-dca - Enable: “Enable Spot & Margin Trading”
- Do NOT enable: Withdrawals, Futures, or anything else
- Save your API Key and Secret
Option B: OKX
- Log into OKX
- Go to Profile → API Keys → Create API Key
- Select Trading as the purpose
- Set permissions: Trade only (no withdrawal)
- Set a passphrase (you’ll need this later)
- Save your API Key, Secret, and Passphrase
Option C: Bybit
- Log into Bybit
- Go to Account & Security → API Management
- Click Create New Key → System-Generated API Keys
- Permissions: Read-Write for Spot trading only
- Save your API Key and Secret
Add Keys to OpenClaw
Create a .env file in your OpenClaw home directory with your exchange credentials:
# For Binance
BINANCE_API_KEY=your_key_here
BINANCE_API_SECRET=your_secret_here
# For OKX
OKX_API_KEY=your_key_here
OKX_API_SECRET=your_secret_here
OKX_PASSPHRASE=your_passphrase_here
# For Bybit
BYBIT_API_KEY=your_key_here
BYBIT_API_SECRET=your_secret_here
Security: Only add the exchange you’re using. These keys never leave your machine — OpenClaw runs 100% locally.
Step 3: Set Up Your DCA Strategy
Open the OpenClaw dashboard (openclaw dashboard) and type your strategy in plain English:
I want to set up a BTC DCA strategy:
- Buy $50 of BTC/USDT every Monday at 9:00 AM UTC
- Use spot market orders on Binance
- Log every purchase with the date, price, and amount
- Send me a summary after each buy
Using OKX or Bybit? Just replace “Binance” with your exchange name. OpenClaw handles the API differences automatically.
What Happens Behind the Scenes
This is the part most tutorials skip. When you type that message, OpenClaw doesn’t just “understand” your request — it actually writes a program to execute it. Here’s the flow:
-
Parsing your intent — The LLM (Claude, GPT, etc.) breaks your natural language instruction into structured logic: asset, amount, schedule, exchange, logging requirements.
-
Generating a script — OpenClaw creates a Python script (or uses an existing trading skill) that handles the actual execution. Think of it like: you describe the strategy, and OpenClaw acts as a developer who writes the code for you. The generated script typically uses
ccxt(a universal crypto exchange library) to connect to your exchange’s API. -
Showing you the plan — Before running anything, OpenClaw presents its execution plan. You’ll see something like:
I'll create a scheduled task with the following logic:
- Schedule: Every Monday at 09:00 UTC
- Action: Market buy BTC/USDT worth $50 on Binance Spot
- Logging: Append each trade to ~/openclaw/dca-log.csv
- Notification: Send summary via dashboard after each execution
Dependencies: ccxt, python-dotenv
Exchange credentials: Using BINANCE_API_KEY from .env
Should I proceed? (yes/no)
-
Executing on schedule — Once you confirm, OpenClaw registers this as a recurring task in its local daemon. Every Monday at 9 AM UTC, it runs the script: fetches the current BTC price, calculates how much BTC $50 buys, places a market order, logs the result, and notifies you.
-
Persistent memory — OpenClaw remembers this task across restarts. It’s stored locally in its state directory, so even if you reboot your machine, the DCA schedule picks back up.
The beauty of this approach: you don’t need to read or edit the code. But if you want to, it’s all there — plain Python files in your OpenClaw directory. You can inspect exactly what it’s doing, modify the logic, or even run the script manually.
My Recommended Settings for Beginners
| Parameter | My Setting | Why |
|---|---|---|
| Amount | $50/week | Enough to matter, small enough to not panic |
| Frequency | Weekly (Monday 9 AM UTC) | Avoids weekend volatility, consistent schedule |
| Pair | BTC/USDT | Start with BTC. Add ETH later if you want |
| Order type | Spot market | Simplest. No leverage, no futures, no risk of liquidation |
Step 4: Verify It’s Working
After setup, ask OpenClaw:
Show me my DCA status
You’ll see something like:
DCA Bot Status: Active
Strategy: Buy $50 BTC/USDT weekly
Exchange: Binance (Spot)
Next buy: Monday, Feb 24, 2026 at 09:00 UTC
Total buys so far: 0
Total invested: $0
Useful Commands
Once your bot is running, you can manage it through conversation:
| What you want | What to say |
|---|---|
| Check status | ”How’s my DCA going?” |
| See all trades | ”Show me my DCA trade history” |
| Pause the bot | ”Pause DCA until next week” |
| Change amount | ”Change my DCA to $100 per buy” |
| Change frequency | ”Switch to buying every day instead” |
| Check P&L | ”What’s my average cost basis vs current price?” |
| Stop completely | ”Stop my DCA bot” |
Step 5: Make It Smarter (Optional)
Here’s where OpenClaw gets interesting. A basic DCA buys the same amount regardless of market conditions. But you can add intelligence with plain English:
Buy More When the Market Dips
Update my DCA: if BTC drops more than 8% in the last 24 hours,
double the buy amount for that cycle.
Skip Buys in Extreme Euphoria
Update my DCA: if BTC is up more than 20% in the last 7 days,
skip the buy and notify me instead.
Adaptive DCA Based on Fear & Greed
Update my DCA:
- If the Crypto Fear & Greed Index is below 25 (Extreme Fear): buy $100
- If between 25-75: buy $50 (normal)
- If above 75 (Extreme Greed): buy $25
This kind of conditional logic would normally require writing code. With OpenClaw, you just describe what you want.
Safety Checklist
Before walking away and letting your bot run:
- API keys are trade-only — No withdrawal permissions, ever
- Start with a small amount — Run $10 buys for a week before scaling up
- Check on it daily at first — Trust but verify for the first 5-7 cycles
- Set a budget limit — Tell OpenClaw: “Never spend more than $200 in a single week”
- Keep your machine running — OpenClaw runs locally. If your computer is off, it can’t execute trades. Consider a cheap VPS or always-on Mac Mini for 24/7 operation
Common Questions
Q: What happens if my computer is off when a buy is scheduled? OpenClaw runs as a local daemon, so it works as long as your machine is on. If it’s off, the buy is missed. For 24/7 reliability, run it on a VPS or a dedicated machine.
Q: Can I DCA into multiple coins? Yes. Just tell OpenClaw: “Also add a $25/week DCA for ETH/USDT on the same schedule.”
Q: How much does OpenClaw cost? Nothing. It’s free and open-source. You only pay your exchange’s trading fees (typically 0.1% per trade).
Q: Can I DCA on multiple exchanges at once? Yes. Add API keys for each exchange and tell OpenClaw which exchange to use for each strategy.
What I’d Do Differently Starting Over
- Start during a bear market — I know, obvious in hindsight. But the data shows it doesn’t matter that much. Just start.
- Don’t watch the price — The whole point of DCA is to remove emotion. Checking the chart daily defeats the purpose.
- Set it and forget it for 6 months — The first few weeks feel pointless. The compounding magic takes time.
- Use the adaptive strategy from day one — Buying more during fear and less during greed meaningfully improves returns.
Next Steps
- Want more strategies? Check out our grid trading tutorial with OpenClaw
- Ready to code your own bot? Move to the Build Bots with AI track
- Want better indicators? See how to build TradingView indicators with AI