Communitygithub.com

modbender/skill-library-mcp

Interactive Brokers (IBKR) TWS/게이트웨이용 종합 스킬입니다. 계정, 시장 데이터, 과거 데이터, 계약 조회, 스캐너 및 주문 생애주기 관리를 위한 Python 및 bash CLI를 제공합니다.

skill-library-mcp란 무엇인가요?

이 스킬은 Interactive Brokers TWS(트레이더 워크스테이션) 및 IB 게이트웨이와 통합하여, Python 및 bash CLI를 통해 계정 관리, 시장 데이터, 과거 데이터 조회, 계약 검색, 스캐너 및 주문 생애주기 관리 등 포괄적인 IBKR 운영 워크플로를 제공합니다. 주로 `ib_insync` 라이브러리를 기반으로 구축되었으며, 연결 구성은 환경 변수나 CLI 플래그를 통해 유연하게 설정할 수 있습니다. 주요 사용 사례로는 계정 요약 및 포지션 확인, 실시간/과거 시세 조회, 주문 체결 및 취소, 기술적 스캐너 실행 등이 있으며, MKT, LMT, STP 등 다양한 주문 유형을 지원합니다. 이 스킬은 Claude Code, Cursor, Codex 등 에이전트 플랫폼과 호환되며, 스크립트는 오류 발생 시 비정상 종료 코드를 반환하여 디버깅을 용이하게 합니다.

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

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

IBKR 스킬

개요

이 스킬은 Interactive Brokers TWS(트레이더 워크스테이션) 및 IB 게이트웨이와 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 게이트웨이가 실행 중이어야 함.
  • 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는 다음과 같은 경우 0이 아닌 종료 코드를 반환합니다:

  • 가져오기/종속성 실패
  • 연결 실패
  • 계약 자격 실패
  • 잘못된 인수
  • 취소할 미체결 주문 없음

참고 자료

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.

관련 스킬