Claude-skill-registry ibkr-gateway-api
Use when working in mm-ibkr-gateway to access market data, account summary, positions, PnL, or orders via the REST API (FastAPI). Covers starting the API server, required env and safety settings, authentication with X-API-Key, and market/account/order endpoints for quote, historical bars, preview, place, status, cancel, and open orders.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/ibkr-gateway-api" ~/.claude/skills/majiayu000-claude-skill-registry-ibkr-gateway-api && rm -rf "$T"
manifest:
skills/data/ibkr-gateway-api/SKILL.mdsource content
IBKR Gateway API
Overview
Use the REST API in this repo to fetch market data, read account data, and manage orders safely with preview-first flow.
Workflow
-
Confirm safety mode and connectivity.
- Ensure IBKR Gateway or TWS is running on the configured host/port.
- Keep
andTRADING_MODE=paper
unless explicitly asked to enable live trading.ORDERS_ENABLED=false - If exposing the API, set
and requireAPI_KEY
on requests.X-API-Key
-
Start the API server.
orpython -m api.serveribkr-gateway start-api- Verify with
.GET /health
-
Use market data, account, and order endpoints.
- Read
for full endpoint docs and error codes.api/API.md - Read
for request/response schemas (OrderSpec, Position, AccountSummary).docs/SCHEMAS.md - Read
before enabling live trading.docs/SAFETY_CHECKLIST.md
- Read
-
Prefer preview-first order flow.
- Call
beforePOST /orders/preview
.POST /orders - If
,ORDERS_ENABLED=false
returnsPOST /orders
.SIMULATED
- Call
Minimal Examples
Account summary:
curl http://localhost:8000/account/summary
Quote snapshot:
curl -X POST http://localhost:8000/market-data/quote \ -H "Content-Type: application/json" \ -d '{"symbol": "AAPL", "securityType": "STK"}'
Preview a limit order:
curl -X POST http://localhost:8000/orders/preview \ -H "Content-Type: application/json" \ -d '{ "instrument": {"symbol": "AAPL", "securityType": "STK"}, "side": "BUY", "quantity": 10, "orderType": "LMT", "limitPrice": 150.00 }'
References
for market/account/order endpoint lists and request patterns.references/api-endpoints.md