Client Portal Web API

Client Portal Web API (beta)

Trade, Monitor and Manage Your IB Account

Trade, monitor and manage your IB account with one RESTful Web API

Interactive Brokers offers the ability to trade, monitor and manage your IB account using a single RESTful API. This solution is available for both individual and advisory account structures.

With the Client Portal Web API:

  • There is no need for special libraries to integrate with your application.
  • You use only a small, headless gateway to connect to your application. Not required for leased-line clients.
  • Additional security with IP restrictions is available.
  • Enjoy access to data that's not available through our existing APIs, including PortfolioAnalyst, Statements, Transaction History (up to 90 days) and more.

Getting Started with Client Portal Web API


Setup and Configuration

  1. Please email to obtain the download link if you are interested in participating in the beta program for our Client Portal Web API.
    • If you are using a leased-line and would like to participate in the Client Portal Web API beta program, please contact your sales representative.
  2. Once you have obtained the download link, you can download and extract to any location to which you have access. For this example we will use the following locations, based on Operating System:
    • Windows: c:\gateway\
    • Linux: ~user\gateway
  3. Once extracted, the following directories are available:
    • bin\ contains the run scripts for both Linux and Windows
    • build\ contains all the 3rd party libraries required for the Gateway to run
    • dist\ contains the .jar file for the Gateway
    • doc\ contains Getting and guides
    • root\ contains files required for the runtime configuration of the Gateway and is also the location where webapps reside.

Running the Gateway

  1. To start the gateway, you need to open a command prompt (Windows) or bash (Linux) on the directory to which the files were extracted (c:\gateway\ or ~user\gateway).
  2. Once in that directory, run "bin\run.bat root\conf.yaml" or "bin/ root/conf.yaml"
  3. When the gateway is running, you should see the following entry in the console: "Server listening on port 5000"
    • By default the gateway runs in SSL mode and port 5000.

Now that the gateway is running, you are ready to authenticate:

  1. Open your browser and go to: https://localhost:5000/. This should display the regular IB login page which is also visible here:
  2. Log in to your account using your IB username and password credentials.
    • Once you have successfully logged in, the gateway will confirm that the client is authenticated or will display any reasons that the authentication may have failed. Once the gateway is authenticated, you can close the browser.
    • Moving forward, the end points documented in the API spec should be available for you to query with curl or any other HTTP client of your choosing.
    • For instructions about subscribing to streaming events over websockets, see doc\

Client Portal Web API Guide