Getting Started
Get MarketClaw up and running in your Telegram in just a few minutes.
Requirements
- ✓ Node.js 18+ — Required for running the bot
- ✓ Telegram Bot Token — From @BotFather
- ✓ OpenClaw API Key — For OpenClaw-powered analysis
1. Download or Clone
Clone the MarketClaw repository to your local machine:
terminal
git clone https://github.com/MarketClaw/marketclawbot.git
cd marketclawbot 2. Install Dependencies
Install all required npm packages:
terminal
npm install 3. Get Telegram Bot Token
- Open Telegram and search for
@BotFather - Send
/newbotto create a new bot - Follow the prompts to name your bot
- Copy the API token provided (looks like
123456:ABCdefGHIjklMNO...)
Keep your bot token secret! Never commit it to version control.
4. Get OpenClaw API Key
- Go to the OpenClaw console to get your API key
- Create an account or sign in
- Navigate to API Keys section
- Create a new API key and copy it
5. Configure Environment Variables
Create a .env file in the project root with your credentials:
.env
# Telegram Bot Token from @BotFather
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
# OpenClaw API Key
OPENCLAW_API_KEY=your_openclaw_api_key_here
You can also copy from the example file: cp .env.example .env
6. Build and Run
Compile the TypeScript and start the bot:
terminal
npm run build
npm start For development with auto-reload:
terminal
npm run dev 7. Test in Telegram
Open your bot in Telegram and send the /start command. You should see a welcome message:
🦞
Welcome to MarketClaw!
I am your OpenClaw-powered market analysis assistant. Use /help to see available commands.
Try your first analysis:
/analyze AAPL Troubleshooting
| Problem | Solution |
|---|---|
| Bot not responding | Check TELEGRAM_BOT_TOKEN is correct and bot is running |
| Invalid ticker | Verify the symbol exists on Yahoo Finance. Use BTC-USD for crypto, EURUSD=X for forex |
| API rate limits | Wait a few minutes before retrying. Yahoo Finance has usage limits |
| AI analysis failing | Check OPENCLAW_API_KEY is valid and has sufficient credits |
| Build errors | Ensure Node.js 18+ is installed. Run npm install again |
| Alerts not firing | Alerts check every 5 minutes. Ensure price threshold is realistic |