Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Interactive Brokers API with Python and ib_async

Part Time Larry via YouTube

Overview

Google, IBM & Meta Certificates — All 10,000+ Courses at 40% Off
One annual plan covers every course and certificate on Coursera. 40% off for a limited time.
Get Full Access
Learn to use the ib_async Python library for simplified coding with the Interactive Brokers API through this 24-minute tutorial. Discover the fundamentals of asynchronous programming using a chess exhibition analogy to understand how concurrent operations work. Start by building a synchronous version for fetching historical data from Interactive Brokers, then observe the performance limitations when fetching data for multiple symbols sequentially. Transform your code into an asynchronous version using asyncio.run() and async def functions, implementing await statements with coroutines and tasks. Master the use of asyncio.gather() to fire off multiple coroutines simultaneously, dramatically improving performance when handling multiple symbols. Follow along with practical demonstrations that show the clear speed advantages of asynchronous programming over synchronous approaches, complete with source code and written tutorial resources for further learning.

Syllabus

0:00 Overview: What is ib_async?
1:06 Demo of what we'll build
3:04 Support ib_async project, support my channel
4:43 Asynchronous Programming
6:03 Chess Exhibition Analogy
8:20 How does this relate to ib_async
9:03 Historical data fetch - synchronous version
12:28 Fetching for many symbols synchronously slow
14:43 Updated structured for multiple symbols
15:57 Making it async - asyncio.run, async def
18:10 Using await and coroutines / tasks, chess analogy continued
20:02 Updating fetch data for async
20:20 Firing off many coroutines / tasks with asyncio.gather faster
23:32 Wrapping Up and What's Next

Taught by

Part Time Larry

Reviews

Start your review of Interactive Brokers API with Python and ib_async

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.