IBKR integration proof of concept
Verify IB Gateway / TWS socket reachability from the CF2 backend before wiring Recommended Trades execution.
Easy setup — you only do 2 things
- In TWS (paper): Edit → Global Configuration → API → Settings → tick Enable ActiveX and Socket Clients → port 7497 → Apply. Leave TWS open.
- On your Mac: double-click IBKR-Connect.command in the
cycleforgefolder on Desktop (it edits config, restarts CycleForge, opens this page).
No Terminal commands or .env editing needed — the script does that for you.
Gateway status
Checking…
Probing from backend container…
Default target: host.docker.internal:7497 (TWS paper). IB Gateway paper is often 4002.
Enable Edit → Global Configuration → API → Settings → Enable ActiveX and Socket Clients in TWS/Gateway.
Override host/port via IBKR_GATEWAY_HOST / IBKR_GATEWAY_PORT in .env.cf2.
Backend config
Loading…
Account sizing reference: IBKR_ACCOUNT_USD (~£75k GBP equivalent for position math).
Order preview (stub)
Returns a sample limit-day buy payload when gateway is reachable and preview flag is enabled.