TEST · IBKR Integration POC · connectivity probe · order preview stub

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

  1. In TWS (paper): Edit → Global Configuration → API → Settings → tick Enable ActiveX and Socket Clients → port 7497 → Apply. Leave TWS open.
  2. On your Mac: double-click IBKR-Connect.command in the cycleforge folder on Desktop (it edits config, restarts CycleForge, opens this page).

No Terminal commands or .env editing needed — the script does that for you.

Sandbox only — no orders are transmitted. Enable IBKR_POC_ORDERS_ENABLED=true only after IBKR API approval and gateway login.

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.

Activity log