Learn how to trade with Interactive Brokers and Python

Xavier Escudero
5 min readMar 11, 2024

This article will guide you through the process of setting up a paper account with Interactive Brokers (IBKR) and executing orders using Python.

If you haven’t already opened an account with Interactive Brokers, I highly recommend it. It stands out among platforms with its competitive rates and excellent API for trading.

In the examples provided, we’ll be accessing a simulated account. Once you’re comfortable and have conducted sufficient testing, you can transition to using a real account.

Setting up a paper account

If you already have an Interactive Brokers account, activate the Paper trading or simulated trading mode by following these steps:

  1. Access the Interactive Brokers portal
  2. Under Login, select the Live option and log in using your username and credentials.
  3. Approve notification on mobile authentication
  4. From our profile go to the Settings section
  5. Find the text Simulated trading account and click on it
  6. Activate options

We will have to wait for the approval of paper account, approximately 1 day.

IKBR uses two-factor authentication to register and make

--

--

Xavier Escudero

Innovation enthusiast, passionate about automation in several fields, like software testing and trading bots