Agent skill
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 this agent skill to your Project
npx add-skill https://github.com/MrRolie/mm-ibkr-gateway/tree/main/.skills/ibkr-gateway-api
SKILL.md
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
TRADING_MODE=paperandORDERS_ENABLED=falseunless explicitly asked to enable live trading. - If exposing the API, set
API_KEYand requireX-API-Keyon requests.
-
Start the API server.
python -m api.serveroribkr-gateway start-api- Verify with
GET /health.
-
Use market data, account, and order endpoints.
- Read
api/API.mdfor full endpoint docs and error codes. - Read
docs/SCHEMAS.mdfor request/response schemas (OrderSpec, Position, AccountSummary). - Read
docs/SAFETY_CHECKLIST.mdbefore enabling live trading.
- Read
-
Prefer preview-first order flow.
- Call
POST /orders/previewbeforePOST /orders. - If
ORDERS_ENABLED=false,POST /ordersreturnsSIMULATED.
- 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
references/api-endpoints.mdfor market/account/order endpoint lists and request patterns.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ibkr-gateway-python
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.
git-guardrails-claude-code
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
Didn't find tool you were looking for?