No API key. You run IB Gateway on your own machine and While25 talks to it over localhost.
Before you start
The paper login is not your live username. Set it in Client Portal under Settings, then Paper Trading Account.
4002, and add 127.0.0.1 to Trusted IPs.Read-Only API must be unticked. While it is ticked, IBKR refuses every order While25 sends, with no reason given.
127.0.0.1:4002 on your machine. Nothing leaves it except Gateway's own link to IBKR: no keys, and no order passes through our servers.What While25 needs
Anything that closes Gateway closes your connection: a laptop asleep, an overnight restart, the daily logout.
When it does not work
Gateway is not running, or its socket port is not 4002. A live login defaults to 4001 and Trader Workstation to 7497: set 4002 in Configure, Settings, API, Settings.
Read-Only API is still ticked. Untick it in Configure, Settings, API, Settings, then reconnect.
That is the daily restart. Set the auto-restart time in Lock and Exit to a quiet hour.
Add 127.0.0.1 to Trusted IPs so your own machine stops being questioned.
IBKR market data is a separate subscription per exchange. A paper account inherits whatever the live account subscribes to.
Straight from Interactive Brokers
Want something quicker for a first look? Alpaca takes about five minutes.