← スキル一覧に戻る

ibkr-gateway-python
by MrRolie
Safe-by-default IBKR Gateway (Python) — FastAPI REST API, CLI, MCP, demo; optional Windows deployment with IBAutomater.
⭐ 1🍴 0📅 2026年1月23日
SKILL.md
name: ibkr-gateway-python description: Use when working in mm-ibkr-gateway to access market data, account summary, positions, PnL, or orders directly in Python via ibkr_core. Covers connecting with IBKRClient, using market/account/order helpers, and safety rules for preview, place, cancel, and status.
IBKR Gateway Python
Overview
Use ibkr_core modules in Python scripts or notebooks to fetch market data, read account data, and manage orders with safety rails.
Workflow
-
Confirm safety mode and connectivity.
- Ensure IBKR Gateway or TWS is running on the configured host/port.
- Keep
TRADING_MODE=paperandORDERS_ENABLED=falseunless explicitly asked to enable live trading. - For offline testing, set
IBKR_MODE=simulationand useget_ibkr_clientfromibkr_core.simulation.
-
Create and connect a client.
- Use
IBKRClient(mode="paper")orget_ibkr_client()(respectsIBKR_MODE). - Call
client.connect()andclient.disconnect().
- Use
-
Use market data, account, and order helpers.
- Market data:
get_quote,get_quotes,get_historical_bars,get_streaming_quote,get_quote_with_mode - Account:
get_account_summary,get_positions,get_pnl,get_account_status,list_managed_accounts - Orders:
preview_order,place_order,get_order_status,cancel_order,get_open_orders,cancel_order_set - Pass
account_idwhen targeting a specific account; omit to use the first managed account.
- Market data:
-
Prefer preview-first order flow.
- Call
preview_orderbeforeplace_order. - If
ORDERS_ENABLED=false,place_orderreturnsSIMULATED.
- Call
References
references/python-usage.mdfor import lists and code examples.ibkr_core/models.pyanddocs/SCHEMAS.mdfor field names and order types.notebooks/02_market_data.ipynb,notebooks/03_account_status.ipynb, andnotebooks/04_orders.ipynbfor end-to-end workflows.
スコア
総合スコア
70/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です