Skip to content
Back to skills

Ibkr Gateway Python

ASecurity

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.

  • 666 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added February 9, 2026
toolspythonrailstesting

Works with

  • cli

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill ibkr-gateway-python --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ibkr Gateway Python?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ibkr Gateway Python
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-ibkr-gateway-python/badge)](https://www.skillsdirectory.com/skills/majiayu000-ibkr-gateway-python)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
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

1. Confirm safety mode and connectivity.
   - Ensure IBKR Gateway or TWS is running on the configured host/port.
   - Keep `TRADING_MODE=paper` and `ORDERS_ENABLED=false` unless explicitly asked to enable live trading.
   - For offline testing, set `IBKR_MODE=simulation` and use `get_ibkr_client` from `ibkr_core.simulation`.

2. Create and connect a client.
   - Use `IBKRClient(mode="paper")` or `get_ibkr_client()` (respects `IBKR_MODE`).
   - Call `client.connect()` and `client.disconnect()`.

3. 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_id` when targeting a specific account; omit to use the first managed account.

4. Prefer preview-first order flow.
   - Call `preview_order` before `place_order`.
   - If `ORDERS_ENABLED=false`, `place_order` returns `SIMULATED`.

## References

- `references/python-usage.md` for import lists and code examples.
- `ibkr_core/models.py` and `docs/SCHEMAS.md` for field names and order types.
- `notebooks/02_market_data.ipynb`, `notebooks/03_account_status.ipynb`, and `notebooks/04_orders.ipynb` for end-to-end workflows.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.