ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

ibkr-openclaw

Connect OpenClaw to Interactive Brokers via IB Gateway Docker. Live portfolio data, real-time quotes, historical K-lines, technical analysis, and Telegram alerts — all read-only safe. Use when users ask about IBKR integration, portfolio monitoring, stock analysis, or automated trading alerts.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/amuletxheart/ibkr-openclaw
Or

IBKR + OpenClaw Integration

Connect OpenClaw to your Interactive Brokers account for live portfolio monitoring, real-time quotes, technical analysis, and automated Telegram alerts.

Features

  • Live account data — NAV, cash, P&L, buying power
  • Positions — all holdings with avg cost and exchange
  • Real-time quotes — delayed or live market data
  • Historical K-lines — daily OHLCV data for technical analysis
  • Technical indicators — RSI, MACD, Bollinger Bands, ATR, MA (via ib_async)
  • Read-only safe — API configured for read-only access

Prerequisites

  • Interactive Brokers account (live or paper)
  • IBKR Mobile app (for 2FA approval)
  • Docker & Docker Compose installed on your server
  • Python 3.9+ with ib_async and pandas

Setup Guide

Step 1: Install Docker

curl -fsSL https://get.docker.com | sh
docker --version
docker compose version

Step 2: Clone IB Gateway Docker

The IB Gateway runs in a Docker container based on gnzsnz/ib-gateway-docker.

cd ~/.openclaw/workspace
git clone https://github.com/gnzsnz/ib-gateway-docker.git
cd ib-gateway-docker

Step 3: Configure Environment

Create a .env file in the ib-gateway-docker directory:

# IBKR Account
TWS_USERID=your_username
TWS_PASSWORD=your_password

# Trading mode: live or paper
TRADING_MODE=live

# Read-only API (recommended for monitoring)
READ_ONLY_API=yes

# API settings
TWS_ACCEPT_INCOMING=auto
TWS_MASTER_CLIENT_ID=1

# 2FA device name (find in IBKR web portal → Settings → Security)
TWOFA_DEVICE=IB Key

# 2FA timeout
TWOFA_TIMEOUT_ACTION=exit

# Timezone
TIME_ZONE=Asia/Singapore
TZ=Asia/Singapore

# VNC password (optional, for remote desktop)
VNC_SERVER_PASSWORD=your_password

# Auto restart (daily maintenance)
AUTO_RESTART_TIME=23:45

# Save settings between restarts
SAVE_TWS_SETTINGS=yes

Important: Find your TWOFA_DEVICE name in your IBKR web portal under: Settings → Security → Second Factor Authentication → Devices

Step 4: Start the Container

docker compose up -d

Check logs:

docker logs algo-trader-ib-gateway-1 --tail 20

Step 5: Approve 2FA

The Gateway will prompt for 2FA. Approve the notification on your IBKR Mobile app.

Once connected, the API is available on:

  • Port 4001 → Paper trading API
  • Port 4002 → Live trading API (read-only if configured)

Step 6: Install Python Dependencies

pip install ib_async pandas

Step 7: Test the Connection

python3 ~/.openclaw/workspace/skills/ibkr-openclaw/scripts/ibkr_client.py summary --port 4001

Metadata

Stars4473
Views2
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-amuletxheart-ibkr-openclaw": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.