Open Source · 247K+ GitHub Stars · MIT License

OpenClaw Automated Trading

Connect OKX, Binance, Bitget to an open-source AI agent. Automate DCA, grid trading, price alerts, and quantitative strategies — all from your terminal.

247K+
GitHub Stars
100%
Open Source
100+
Exchanges Supported
MIT
License
terminal

# Install OpenClaw globally

$ npm install -g openclaw@latest

# Run the onboarding wizard

$ openclaw onboard

# Install exchange trading skills

$ openclaw skill install ccxt binance okx

# Query live market data

$ ccxt binance fetchTicker "BTC/USDT"

{ symbol: "BTC/USDT", last: 87432.50, change: +2.3% }

What Is OpenClaw?

OpenClaw is the fastest-growing open-source AI agent framework (247K+ GitHub stars). Originally created by Peter Steinberger in November 2025, it lets you connect AI models (Claude, GPT, or local Ollama) to real-world tools — including crypto exchange APIs for automated trading.

🤖

AI-Powered Decisions

OpenClaw uses large language models to analyze market conditions, news sentiment, and on-chain data. It can make trading decisions based on natural language instructions like "buy $50 of BTC every day at 9am" or "sell ETH if it drops 5% in an hour".

🔗

100+ Exchange Integrations

Through the CCXT (CryptoCurrency eXchange Trading) skill, OpenClaw connects to over 100 exchanges including OKX, Binance, Bitget, Bybit, KuCoin, Coinbase, and Kraken. One unified interface for all your trading needs.

📊

Workflow Automation

The built-in Lobster workflow engine lets you chain skills into automated pipelines: scheduled DCA purchases, price-triggered alerts, portfolio rebalancing, and multi-exchange arbitrage — all running 24/7 on your own server.

Supported Exchanges

OpenClaw integrates natively with the three major exchanges via dedicated skills and the universal CCXT connector.

OKX

Dedicated OKX Skill

# .env

OKX_API_KEY=your_key

OKX_SECRET=your_secret

OKX_PASSPHRASE=your_pass

  • Spot / Futures / Margin trading
  • Stock token trading supported
  • Real-time market data & WebSocket

Binance

Dedicated Binance Skill

# .env

BINANCE_APIKEY=your_key

BINANCE_SECRET=your_secret

  • Spot / Futures / Margin trading
  • Binance AI Agent Skills compatible
  • Real-time market data & WebSocket

Bitget

Via CCXT Universal Connector

# .env (via CCXT)

BITGET_APIKEY=your_key

BITGET_SECRET=your_secret

BITGET_PASSWORD=your_pass

  • Spot / Futures / Margin trading
  • Copy trading API access
  • Real-time market data & WebSocket

Step-by-Step Setup Guide

From zero to your first automated trade in 15 minutes. Requires Node.js 22+ and an exchange API key.

Install OpenClaw

Install OpenClaw globally via npm. It requires Node.js version 22 or above. After installation, verify it's working with the version command.

# Node.js >= 22 required

$ npm install -g openclaw@latest

# Verify installation

$ openclaw --version

openclaw v1.x.x

Run the Onboarding Wizard

The onboarding wizard guides you through initial setup: connecting a messaging platform (Telegram, Discord, WhatsApp), configuring an AI model, and setting your preferences.

$ openclaw onboard

# Choose your messaging platform

# Configure AI model (Claude/GPT/Ollama)

# Most users complete setup in under 10 minutes

Install Exchange Skills

Skills are modular plugins that extend OpenClaw's capabilities. Install the CCXT universal connector for broad exchange support, or dedicated skills for exchange-specific features.

# Universal connector (100+ exchanges)

$ openclaw skill install ccxt

# Exchange-specific skills (advanced features)

$ openclaw skill install binance

$ openclaw skill install okx

Configure Exchange API Keys

Create API keys on your exchange account with trading permissions ONLY (no withdrawal permission). Add them to your .env file. Never share these keys or commit them to version control.

# .env configuration file

BINANCE_APIKEY="your_api_key_here"

BINANCE_SECRET="your_secret_key_here"

OKX_API_KEY="your_api_key_here"

OKX_SECRET="your_secret_key_here"

OKX_PASSPHRASE="your_passphrase_here"

BITGET_APIKEY="your_api_key_here"

BITGET_SECRET="your_secret_key_here"

BITGET_PASSWORD="your_passphrase_here"

Start Trading

You're ready to go. Query market data, check balances, and place orders through simple commands. Start with small amounts to test your setup before scaling up.

# Get BTC price on Binance

$ ccxt binance fetchTicker "BTC/USDT"

# Check your OKX balance

$ ccxt okx fetchBalance

# Place a limit buy order

$ ccxt binance createOrder "BTC/USDT" limit buy 0.001 85000

# Query Bitget market data

$ ccxt bitget fetchTicker "ETH/USDT"

Trading Strategies

OpenClaw supports multiple trading strategies out of the box, from simple scheduled purchases to AI-driven quantitative trading.

📈
Low Risk

DCA (Dollar Cost Average)

Automatically buy a fixed dollar amount of crypto at regular intervals — daily, weekly, or monthly. The most proven long-term strategy, removing emotional decision-making from investing.

🔲
Medium Risk

Grid Trading

Place a grid of buy and sell orders across a price range. Profits from volatility by buying low and selling high within the grid. Works best in sideways markets.

📰
Advanced

News-Driven Trading

AI monitors news feeds, social media, and on-chain data in real-time. When significant events are detected, it automatically executes trades based on sentiment analysis.

Expert

Custom Quant Strategies

Build your own trading logic using the Lobster workflow engine. Combine technical indicators, on-chain metrics, and AI analysis into fully custom strategies.

CCXT Command Reference

Common commands for interacting with exchanges through OpenClaw's CCXT skill.

ccxt binance fetchTicker "BTC/USDT"Get real-time BTC price
ccxt okx fetchOHLCV "ETH/USDT" 1hFetch 1-hour ETH candlesticks
ccxt binance fetchBalanceCheck your Binance balance
ccxt binance createOrder "BTC/USDT" market buy 0.01Market buy 0.01 BTC
ccxt binance createOrder "ETH/USDT" limit buy 0.5 3200Limit buy 0.5 ETH at $3,200
ccxt okx fetchOpenOrders "BTC/USDT"View open orders on OKX
ccxt bitget cancelOrder "order_id" "BTC/USDT"Cancel a specific order
ccxt binance fetchMyTrades "BTC/USDT"View your trade history

Workflow Automation Examples

Combine multiple skills into automated workflows using the Lobster engine. These run on a schedule or trigger on specific conditions.

Scheduled DCA Purchase

Automatically buy $50 worth of BTC every day at 9 AM. Notifications sent via Telegram after each purchase.

# DCA Workflow Example

name: "BTC Daily DCA"

schedule: "0 9 * * *"

steps:

- ccxt binance createOrder

"BTC/USDT" market buy 50

notify: telegram

Price Alert & Auto-Trade

Monitor ETH/USDT price. When it moves more than 5%, send an alert and optionally execute a trade based on the direction.

# Price Alert Workflow

name: "ETH Price Alert"

trigger: price_change

condition:

symbol: "ETH/USDT"

change: ">5%"

action: send_message

Security Best Practices

Automated trading involves real money. Follow these security guidelines to protect your funds.

🔑

No Withdrawal Permission

When creating API keys, NEVER enable withdrawal permission. Even if your keys are compromised, attackers cannot withdraw your funds.

🛡️

IP Whitelist

Restrict your API keys to your server's IP address only. This prevents unauthorized access even if keys are leaked.

🌐

Don't Expose Publicly

OpenClaw's web panel defaults to 0.0.0.0:18789. Always bind to 127.0.0.1 or use a reverse proxy with authentication in production.

📋

Audit Skills Before Installing

Only install skills from trusted sources. Review skill source code before installation — malicious skills have been found on the marketplace.

💰

Start Small

Begin with small amounts ($10-50) to test your strategies before committing larger capital. Never invest more than you can afford to lose.

🔄

Monitor Regularly

Set up alerts for unexpected behavior. Check your bot's activity daily. Automated doesn't mean unattended — always maintain oversight.

How Much Does It Cost?

OpenClaw itself is 100% free and open source. Your actual costs come from AI model usage and hosting.

Free Tier

$0 /forever
  • OpenClaw core framework
  • Local AI via Ollama (free)
  • Run on your own computer
  • Community support
Most Popular

Typical Usage

$5-30 /month
  • Cloud AI models (Claude/GPT)
  • VPS hosting ($6-20/mo)
  • Multiple exchange connections
  • 24/7 automated trading

Power User

$40-100+ /month
  • High-frequency AI calls
  • Dedicated server hosting
  • Multiple concurrent strategies
  • Custom skill development

Frequently Asked Questions

Is OpenClaw a trading bot?
OpenClaw is not specifically a trading bot — it's a general-purpose AI agent framework. Trading is one of its many capabilities, enabled through the CCXT and exchange-specific skills. Think of it as a programmable AI assistant that can execute trades among many other tasks.
Can OpenClaw guarantee trading profits?
Absolutely not. No automated trading system can guarantee profits. Markets are inherently unpredictable, and past performance does not indicate future results. Automated trading carries the same risks as manual trading, plus additional risks from software bugs, API failures, and network issues. Always start small and never invest more than you can afford to lose.
Which AI model should I use for trading?
For trading, Claude or GPT-4 are recommended for their superior reasoning abilities. However, for simple scheduled tasks like DCA, even local models via Ollama work fine. The AI model matters most for complex strategies that require market analysis and decision-making.
Is it safe to give OpenClaw my exchange API keys?
OpenClaw runs locally on your own machine or server — your API keys never leave your environment. However, always create keys with trading-only permissions (no withdrawal), use IP whitelists, and audit any third-party skills before installation. Over 800 malicious skills have been found on the marketplace, so be cautious.
Can I use OpenClaw on my phone?
OpenClaw runs as a server process, typically on your computer or a VPS. You interact with it through messaging platforms like Telegram, WhatsApp, or Discord — so yes, you can control it from your phone through these apps, but it runs on a server.
Do I need programming skills?
Basic terminal/command-line knowledge is required for installation and configuration. For simple strategies like DCA, no coding is needed — you configure everything through natural language and config files. For custom quantitative strategies, TypeScript/JavaScript knowledge is helpful.

Ready to Start Automated Trading?

Register on your preferred exchange through our referral links to get exclusive fee discounts. Lower fees = higher profits for your trading bot.

Use our referral links for up to 30% trading fee rebate. Lower trading costs mean better returns for your automated strategies.

⚠️ Risk Disclaimer

Cryptocurrency trading involves substantial risk of loss. Automated trading systems carry additional risks including but not limited to: software bugs, API failures, network outages, and rapid market movements. Past performance is not indicative of future results. Never invest more than you can afford to lose. The information on this page is for educational purposes only and does not constitute financial advice. Always do your own research (DYOR) before making investment decisions.