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.
Scanned 2/12/2026
Install via CLI
openskills install majiayu000/claude-skill-registry---
name: ibkr-gateway-api
description: 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.
---
# 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
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.
- If exposing the API, set `API_KEY` and require `X-API-Key` on requests.
2. Start the API server.
- `python -m api.server` or `ibkr-gateway start-api`
- Verify with `GET /health`.
3. Use market data, account, and order endpoints.
- Read `api/API.md` for full endpoint docs and error codes.
- Read `docs/SCHEMAS.md` for request/response schemas (OrderSpec, Position, AccountSummary).
- Read `docs/SAFETY_CHECKLIST.md` before enabling live trading.
4. Prefer preview-first order flow.
- Call `POST /orders/preview` before `POST /orders`.
- If `ORDERS_ENABLED=false`, `POST /orders` returns `SIMULATED`.
## Minimal Examples
Account summary:
```bash
curl http://localhost:8000/account/summary
```
Quote snapshot:
```bash
curl -X POST http://localhost:8000/market-data/quote \
-H "Content-Type: application/json" \
-d '{"symbol": "AAPL", "securityType": "STK"}'
```
Preview a limit order:
```bash
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
- `references/api-endpoints.md` for market/account/order endpoint lists and request patterns.
No comments yet. Be the first to comment!
Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.
SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.
Python backend development expertise for FastAPI, security patterns, database operations, Upstash integrations, and code quality. Use when: (1) Building REST APIs with FastAPI, (2) Implementing JWT/OAuth2 authentication, (3) Setting up SQLAlchemy/async databases, (4) Integrating Redis/Upstash caching, (5) Refactoring AI-generated Python code (deslopification), (6) Designing API patterns, or (7) Optimizing backend performance.
Drive the full internationalization journey for a project — detect the stack, recommend a library, set up the chosen library, wrap existing strings, and optionally connect a translation platform. Use when the user asks to add or configure i18n, internationalization, localization, multi-language support, or translations — including when they explicitly mention LinguiJS, Lingui, next-intl, "wrap strings", "find hardcoded text", "make my app translatable", or "set up translations". Triggers on g...
PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.