How can I configure TWS or IB Gateway for an API connection?

TWS:

  1. Select File in the Mosaic layout or Edit in the Classic layout
  2. Select Global Configuration from the drop-down menu
  3. Select API and then Settings
  4. Check Enable ActiveX and Socket Clients 
  5. Uncheck Read-Only API
  6. Verify the Socket Port value

IB Gateway:

  1. Select Configure and then Settings
  2. Select API and then Settings
  3. Uncheck Read-Only API
  4. Verify the Socket Port value

For further information on these configuration steps, please consult the TWS API documentation. If you are connecting to TWS or IB Gateway via a Third Party, the above steps will remain the same. Please see our documentation regarding known Third Party Connections.

Powered by IBot
Why does the API connect to my paper trading account but not my live account?
How do I enable or disable the Price Management Algo?
Can I create log files for support purposes?
I see the error "Remote data not accessible" when trying to connect via Excel API. What should I do?