Communitygithub.com

modbender/skill-library-mcp

Interactive Brokers (IBKR) TWS/ゲートウェイと連携する総合スキル。ib_insync を使用し、アカウント情報、市場データ、履歴データ、銘柄検索、スキャナー、注文ライフサイクル管理を Python および bash CLI で提供します。

skill-library-mcp とは?

このスキルは、Interactive Brokers(IBKR)の Trader Workstation(TWS)および IB Gateway と連携するための包括的なツールセットを提供します。ib_insync ライブラリをベースにしており、アカウント情報の取得、リアルタイム市場データの照会、履歴データの取得、銘柄の詳細検索、マーケットスキャナー、注文の作成・変更・キャンセルといった取引ライフサイクル全体をサポートします。Python CLI (ibkr_cli.py) と bash ラッパー(ibkr.sh)の両方を提供し、従来のスクリプトとの互換性も維持しています。接続設定は環境変数またはコマンドラインフラグで柔軟に行え、TWS/ゲートウェイの異なるポートやクライアントIDに対応します。エラーハンドリングも充実しており、依存関係の欠如や接続失敗、入力引数の不正などに対して明確な終了コードを返します。このスキールは主に Cursor、Claude Code、Codex などの AI エージェント環境で活用され、トレーディング業務の自動化や市場分析タスクの効率化に貢献します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/modbender/skill-library-mcp/tree/HEAD/data/ibkr

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

IBKR スキル

概要

このスキルは、Interactive Brokers Trader Workstation(TWS)および IB Gateway と ib_insync を通じて統合し、以下の運用 IBKR ワークフローを公開します:

  • 統一 Python CLI: scripts/ibkr_cli.py
  • bash CLI ラッパー: scripts/ibkr.sh
  • 互換エイリアス: scripts/openclaw.sh
  • 下位互換性のあるスクリプトエントリポイント:
    • scripts/get_account_info.py
    • scripts/get_historical_data.py
    • scripts/place_order.py

前提条件

  • API 権限が有効な Interactive Brokers アカウント。
  • API が有効な状態で実行中の TWS または IB Gateway。
  • Python 3.9 以上を推奨。
  • ib_insync がインストールされていること:
pip install ib_insync

接続設定

すべての CLI は、フラグまたは環境変数を使用して接続を上書きすることができます。

環境変数:

  • IBKR_HOST(デフォルト 127.0.0.1)
  • IBKR_PORT(デフォルト 7497)
  • IBKR_CLIENT_ID(デフォルト 1)
  • IBKR_ACCOUNT(オプション)

例:

IBKR_PORT=4002 IBKR_CLIENT_ID=14 ./scripts/ibkr.sh account-summary
python3 scripts/ibkr_cli.py positions --host 127.0.0.1 --port 7496 --account DU123456

bash CLI

./scripts/ibkr.sh <コマンド> [引数]

サポートされているコマンド:

  • account(アカウントサマリー+ポジション)
  • account-summary
  • positions
  • portfolio
  • pnl
  • quote
  • historical
  • place-order
  • cancel-order
  • open-orders
  • executions
  • contract-details
  • scanner

./scripts/openclaw.sh は同じ CLI サーフェスのエイリアスです。

Python CLI

python3 scripts/ibkr_cli.py <コマンド> [引数]

アカウントサービス

python3 scripts/ibkr_cli.py account-summary --json
python3 scripts/ibkr_cli.py positions --account DU123456
python3 scripts/ibkr_cli.py portfolio --json
python3 scripts/ibkr_cli.py pnl --account DU123456 --wait 2

市場データサービス

python3 scripts/ibkr_cli.py quote --symbol AAPL --sec-type STK --market-data-type 3
python3 scripts/ibkr_cli.py historical --symbol EURUSD --sec-type CASH --duration "30 D" --bar-size "1 hour"

注意:

  • 履歴リクエストは、"30 D" のようなスペースを含むトークンを含む、IB 形式の完全な値をフラグ経由でサポートします。
  • CASH の場合、明示的に上書きされない限り、デフォルトの whatToShow は MIDPOINT です。

銘柄検索

python3 scripts/ibkr_cli.py contract-details --symbol ES --sec-type FUT --expiry 202606

取引と注文ライフサイクル

python3 scripts/ibkr_cli.py place-order --symbol AAPL --sec-type STK --action BUY --quantity 10 --order-type MKT
python3 scripts/ibkr_cli.py place-order --symbol AAPL --sec-type STK --action SELL --quantity 10 --order-type LMT --limit-price 250 --tif GTC
python3 scripts/ibkr_cli.py open-orders
python3 scripts/ibkr_cli.py cancel-order --order-id 12345
python3 scripts/ibkr_cli.py executions --json

CLI でサポートされている注文タイプ:

  • MKT
  • LMT
  • STP
  • STP LMT

place-order はステータス更新を待機し、注文作成中に収集された API エラーを表示します。

スキャナーサービス

python3 scripts/ibkr_cli.py scanner --instrument STK --location-code STK.US.MAJOR --scan-code TOP_PERC_GAIN --rows 25

互換性スクリプト

従来のスクリプトは引き続きサポートされており、統一 CLI に委譲されるようになりました:

  • get_account_info.py
  • get_historical_data.py(従来の位置指定モードも引き続き動作)
  • place_order.py(従来の位置指定モードも引き続き動作)

エラーハンドリング

CLI は以下の場合にゼロ以外の終了コードを返します:

  • インポート/依存関係の失敗
  • 接続失敗
  • 銘柄(コントラクト)の判定失敗
  • 無効な引数
  • キャンセル対象のオープン注文が見つからない

参考資料

IBKR および ib_insync のドキュメントリンクについては、references/api_reference.md を参照してください。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

modbender/skill-library-mcp

Complete investment portfolio risk management system. Analyze positions, calculate risk metrics, stress test scenarios, optimize allocations, and generate institutional-grade risk reports — all wit...

modbender/skill-library-mcp

Borrow from Aave via credit delegation. Agent self-funds by borrowing against delegator collateral. Supports borrow, repay, health checks. Works on Aave V2/V3.

modbender/skill-library-mcp

Discover and register autonomous AI agents. Use when: browsing the agent registry, submitting an agent for verification, or embedding agent badges. NOT for: general web search or agent capability analysis.

modbender/skill-library-mcp

Create AI avatar and talking head videos with OmniHuman, Fabric, PixVerse via inference.sh CLI. Models: OmniHuman 1.5, OmniHuman 1.0, Fabric 1.0, PixVerse Lipsync. Capabilities: audio-driven avatars, lipsync videos, talking head generation, virtual presenters. Use for: AI presenters, explainer videos, virtual influencers, dubbing, marketing videos. Triggers: ai avatar, talking head, lipsync, avatar video, virtual presenter, ai spokesperson, audio driven video, heygen alternative, synthesia alternative, talking avatar, lip sync, video avatar, ai presenter, digital human

modbender/skill-library-mcp

AI代码编辑器规则模板集合 - 为Cursor、Windsurf、Claude Code、Cline等AI编辑器提供项目规则配置。适用于需要配置AI编码助手规则的开发者,包含全栈Web、移动端、Vue3+SpringBoot等技术栈模板。

modbender/skill-library-mcp

Generate landing page code from product descriptions

modbender/skill-library-mcp

Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awareness. Triggers: marketing video, ad video, promo video, commercial, brand video, product video, explainer video, ad creative, video ad, facebook ad video, youtube ad, instagram ad, tiktok ad, promotional video, launch video

modbender/skill-library-mcp

Generate AI music videos end-to-end. Creates music with Suno (sunoapi.org), generates visuals with OpenAI/Seedream/Google/Seedance, and assembles into music video with ffmpeg. Supports timestamped lyrics (auto SRT), Suno native music video generation, slideshow/video/hybrid modes. Token-based cost tracking per generation.

modbender/skill-library-mcp

Generate AI-powered notes from videos (document, outline, or graphic-text formats)

modbender/skill-library-mcp

The video AI notes tool is provided by Baidu. Based on the video download address provided by the user, it downloads and parses the video, and finally generates AI notes corresponding to the video (a total of three types of notes can be generated: document notes, outline notes, and image-text notes).

modbender/skill-library-mcp

Automated appointment management for beauty salons, clinics, studios, and photo booths. Handles booking requests, calendar sync, conflict detection, reminders, no-show tracking, and waitlist management.

modbender/skill-library-mcp

Bird identification, life list tracking, and trading card generation. Use this skill when the user: sends a bird photo to identify, says "set up my Birdfolio" or "set my region", asks "how's my checklist", asks "Birdfolio progress", asks "how many birds have I found", asks "show my Birdfolio" or "show my life list", asks "what's my rarest bird", or asks "tell me about [bird species]". Handles everything from first-time setup through ongoing life list tracking and visual trading card generation.

modbender/skill-library-mcp

Multi-project task and research management (JSON-first CLI)

modbender/skill-library-mcp

Track stock and crypto portfolios with CLI - real-time prices, P&L, dividend tracking, multiple portfolios

modbender/skill-library-mcp

Track cryptocurrency portfolios with real-time prices, P&L calculations, and allocation analysis. Query Bitcoin, Ethereum, Solana and 10,000+ token holdings.

modbender/skill-library-mcp

加密貨幣Portfolio追蹤 - 支援TRON/ETH/BSC,分析持倉、收益、Gas費用

modbender/skill-library-mcp

Lead strategy with competitive analysis, strategic planning, growth roadmaps, and business portfolio management.

modbender/skill-library-mcp

Create ATS-optimized resumes and CVs with proper structure, metrics, and industry targeting.

modbender/skill-library-mcp

Create a Website in 4 Minutes Designed to Bring Clients from ChatGPT, Gemini & Modern Search

modbender/skill-library-mcp

Native video analysis using Google Gemini API. Upload and analyze video files — describe scenes, extract text/UI, answer questions about content, transcribe speech, identify objects and actions. Use when: (1) User sends a video file and wants it analyzed, (2) Video summarization or description needed, (3) Extracting text, UI elements, or information from screen recordings, (4) Answering questions about video content, (5) Comparing multiple videos, (6) Analyzing tutorials, demos, or walkthroughs.

関連スキル