Documentation

Workflow for Interactive Brokers

This diagram shows the functions that you can use with the IB Trader WorkstationSM to monitor market price information and submit orders.

Request Interactive Brokers Market Data

To request current, intraday, real-time, historical, or market depth data:

  1. Connect to the IB Trader Workstation using ibtws.

  2. Create the IB Trader Workstation IContract object.

  3. Request current data for a security using getdata.

  4. Request intraday data for a security using timeseries.

  5. Request real-time data for a security using realtime.

  6. Request historical data for a security using history.

  7. Request market depth data for a security using marketdepth.

  8. Close the IB Trader Workstation connection using close.

Create Interactive Brokers Orders

To submit orders to the IB Trader Workstation:

  1. Connect to the IB Trader Workstation using ibtws.

  2. Create the IB Trader Workstation IContract object.

  3. Create the IB Trader Workstation IOrder object.

  4. Request a unique order identifier using orderid.

  5. Create and submit the order using createOrder.

  6. Request open order data using orders.

  7. Request executed order data using executions.

  8. Close the IB Trader Workstation connection using close.

Request Interactive Brokers Informational Data

To request information from the IB Trader Workstation:

  1. Connect to the IB Trader Workstation using ibtws.

  2. Create the IB Trader Workstation IContract object.

  3. Request contract detailed data using contractdetails.

  4. Request account information using accounts.

  5. Request portfolio data using portfolio.

  6. Close the IB Trader Workstation connection using close.

Was this topic helpful?