Skip to content
Back to skills

Ibkr Gateway Api

ASecurity

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.

  • 666 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 9, 2026
developmentpythonbashfastapiapisecurity

Works with

  • api

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro shows the line behind each finding and how to fix it

Scanned February 12, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Ibkr Gateway Api?

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

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

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-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.

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.