Hi, I followed through the steps on IB + other blogs on the web running TWS, TWI API (latest Windows based for Python). I keep getting the error message "ModuleNotFoundError: No module named 'ibapi'". I am assuming my connection is not established. I checked the Gloavl Config for Active X and also added a trusted localhost (127.0.0.1) trying everything. Any pointers plz?
Maybe your problem is not caused by TWS or its settings, but by the code you are running, and/or how it is compiled?
Hi, that error is a common error in Python when you don't have the right libraries installed. Ibiapi is a module that can be installed with pip. https://pypi.org/project/ibapi/ It should install by using "pip install ibapi"
Yes, as @angrytrader is saying. This is not an error in your code. It is caused by Python not being able to locate the requested library. If you have installed the library, be sure that you are using the same Python instance or Honda environment, if using Anaconda, as where you installed it
Why don't you read the readme before asking basic questions? It literally says you need to build the wheel and install that. Or use a precompiled version with pip.
I'd recommend you check out the IB Short Videos at the following link. They walk you through installation, and really spell it out for you. Click on the "TWS Python API" filter, and work through those vids. https://www.interactivebrokers.com/en/index.php?f=14082 Also, I've found this guide to be quite helpful: http://interactivebrokers.github.io/tws-api/initial_setup.html To add a little color to what the others are saying about your immediate problem: The IB API needs other files to work. These are commonly called "dependencies." You need to install these separately. To make an analogy, think of baking a cake. You need sugar, flour, eggs, frosting, etc. You are missing flour and eggs. You need to get those from somewhere. The easiest way to do this is to use a program called pip, which is designed to go out and get the stuff that you need. I personally do all this from the command line. For someone new to programming, it's a bit of a grind to get going. Dedicate a day to watching these vids and learning.
Thanks heaps to everyone for the pointers. Yes it did install using the command pip install -e pythonclient which covers the solution given above I did start by watching the vids and reading the user guide. But was clueless since i just started learning Python (thought it would be easier since i have worked with PL/SQL/UNIX/Oracle in the past.
This is a coding environment issue and has nothing to do with TWS API. Modern coding environments require VM management. Once you figure that out, it will work.
You'll pick it up fast. Python is very user-friendly. Go through a couple online tutorials/courses. I really like linkedinlearning (formerly lynda.com) and the free MIT courses. Introduction to Computer Science and Programming in Python | Electrical Engineering and Computer Science | MIT OpenCourseWare Learning Python (lynda.com)