ibkr

Installation
SKILL.md

What this is — read this first

🖥️ Local-gateway broker. IBKR has no key-based public API. You run Trader Workstation (TWS) or the lighter IB Gateway on a machine, log in, enable the API socket, and this CLI connects over a local socket. Your IBKR credentials live in TWS — they never reach this skill.

⚠️ This will NOT work from the Starchild container by default, because TWS runs on your computer and the container's 127.0.0.1 is the container itself. Two ways to use it:

  1. Run locally — run TWS/Gateway + this script on your own computer. (simplest)
  2. Bridge the network — run IB Gateway on a host the container can reach, add the container's IP to TWS's "Trusted IPs", and set IBKR_HOST/IBKR_PORT. You handle network/security; never expose the API socket to the open internet.

If status says the socket isn't listening, this is why.

Set up TWS / IB Gateway (one time)

  1. Download TWS or IB Gateway from interactivebrokers.com → Trading → Platforms. IB Gateway is lighter and headless-friendly; TWS is the full GUI.
  2. Log in. Paper trading: IBKR gives every account a free paper login (account id starts with DU); log into the paper session for testing.
  3. Enable the API: TWS → File → Global Configuration → API → Settings → check "Enable ActiveX and Socket Clients". For trading, leave "Read-Only API" unchecked (read-only blocks order placement). Note the Socket port.
  4. Default ports: 7497 = TWS paper, 7496 = TWS live, 4002 = IB Gateway paper, 4001 = IB Gateway live.
  5. Market data requires the relevant data subscriptions on the account, or quotes/bars return empty.
Installs
6
GitHub Stars
18
First Seen
Jun 9, 2026
ibkr — starchild-ai-agent/official-skills