Setting Up Interactive Broker API

  1. Go to the IBKR Client Portal API page at https://www.interactivebrokers.com/en/trading/ib-api.php
  2. Click on the Client Portal API section
  3. Click the Downloads and Resources button
  4. Download the Client Portal API Gateway ("CP Gateway") by clicking on the Gateway:Latest button
  5. Create a folder in the root of your C drive called "gateway" (i.e., c:\gateway)
  6. Extract the downloaded CP Gateway into the c:\gateway folder
  7. Install Java 8. You can download it here: https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
  8. Open a command prompt. Navigate to the c:\gateway folder. Type "bin\run.bat root\conf.yaml" (without the quotation marks).
  9. Open a web browser and navigate to https://localhost:5000
  10. Login to your IBKR account
  11. You are now connected to IBKR and ready to use the API

You can research the Interactive Broker Client Portal API here: https://interactivebrokers.github.io/cpwebapi/

Java is not recognized as an internal or external command

See this: https://stackoverflow.com/questions/15796855/java-is-not-recognized-as-an-internal-or-external-command