Connect a broker · Interactive Brokers
No API key to copy. You run IB Gateway on your own machine, log into it with your paper account, and While25 talks to it over localhost.
The paper login is not your live username. If you have never used it, set it in Client Portal under Settings, then Paper Trading Account.
Read-Only API is the safety switch. Leave it ticked while you are still looking around: IBKR refuses every order from the API. Untick it when you want While25 to trade.
127.0.0.1:4002 for paper or 127.0.0.1:4001 for live. Nothing leaves your machine except the Gateway's own link to IBKR: we hold none of your keys, and none of your orders passes through our servers.Because the session lives in Gateway, anything that closes Gateway closes your connection: a laptop asleep, an overnight restart, the daily logout.
Gateway is not running, or it is on the other port. Paper is 4002 and live is 4001; if you launched TWS by mistake the ports are 7497 and 7496.
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.
Want something quicker for a first look? Alpaca takes about five minutes.