Python API for Trading

Python programming with Interactive Brokers' Trader Workstation API
Free tutorial
Rating: 4.6 out of 5 (199 ratings)
15,956 students
1hr 30min of on-demand video
English [Auto]

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.


Global Financial Services Dealing Platform
Interactive Brokers
  • 4.5 Instructor Rating
  • 447 Reviews
  • 20,857 Students
  • 2 Courses

Interactive Brokers' courses are intended for financial professionals, investors, educators and students seeking a better understanding of the asset classes, markets, currencies, tools and functionality available on IB's award-winning Trader Workstation (TWS), IBKR Mobile, Account Management and TWS API applications.

Even the most experienced traders or investors need to keep learning to stay ahead. Interactive Brokers provides several resources to help you better understand IBKR products and services, markets and technology.

Interactive Brokers provides execution and clearing services to clients. None of the information contained herein constitutes a recommendation, offer, or solicitation of an offer by Interactive Brokers to buy, sell or hold any security, financial product or instrument or to engage in any specific investment strategy.

Top companies trust Udemy

Get your team access to Udemy's top 22,000+ courses