Installed ibpy2 but cannot import

853 views Asked by At

I installed Ibpy2 to connect to my interactive broker account.

https://github.com/blampe/IbPy

I installed IbPy2 successfully (by installing pip install IbPy2 AND python setup.py install).

However, when I open Spyder in Anaconda and run from IBWrapper import IBWrapper, contract. It says:

No module named 'IBWrapper'.

Please advise how I may fix it. Many, many thanks!

2

There are 2 answers

0
misantroop On

IbPy is outdated, it's a 3rd party module that's no longer supported as there is an official Python module available.

If you wish to use a IbPy like interface to interact with the official API, use IbPythonic. It's almost identical to IbPy with minor adjustments, for example IbPy has 'm_' prefixes in functions.

0
Aqueous Carlos On

Please refer to https://github.com/anthonyng2/ib It is third party python file that you may directly code

from IBWrapper import IBWrapper, contract

You need to download the IBWrapper.py file and copy it into your python library path.