Python API for Trading

How to trade and view market data using the Python TWS API.

Installing & Configuring TWS for the API, Receiving Market Data and Historical Candlesticks, Placing Orders, Option Chains, Accessing Portfolio Data


  • Windows, Linux, or Mac OSX computer with GUI and Python 3.3 or higher installed.
  • Familiarity with Python programming
  • The TWS API utilizes socket programming, multiple threads, and other concepts which it is recommended to be familiar with beforehand. If not, it is suggested to first try an Introduction to Python course which covers these topics.


This is a course in programming with the Trader Workstation Application Programming Interface (TWS API) for Python developers. In this course, we describe how to get started in developing Python applications that use the API. 

Josh joined the IBKR API team in 2015 and has been an active contributor to API educational resources including the TWS API reference guide and webinars. Before joining the team, he was an automated trading enthusiast interested in trading APIs and machine learning technologies. Josh has a BS in Computer Science from Carnegie Mellon University.

Lesson Structure:

  • What is the TWS API?
  • Installing & Configuring TWS for the API
  • Accessing the TWS Python API Source Code
  • Essential components of TWS API programs
  • Receiving Market Data and Historical Candlesticks
  • Placing Orders
  • Option Chains, Portfolio Data and Account Information
  • API Case Study in Pair Trades

Who this course is for:

  • Python programmers who want to learn about the Trader Workstation API.

Course content

Leave a Reply

Your email address will not be published. Required fields are marked *