0

I am woarking with python 3.6, I want to use the new API from : ib_insync.

I have installed this library and followed the instructions from the help page :

Python version 3.6 or higher;
The Interactive Brokers Python API version 9.73.03 or higher;
A running TWS or IB gateway application (version 967 or higher). Make sure the API port is enabled and 'Download open orders on connection' is checked.

Hoever, when I run the sample code on Spyder I have the following error message : IB API from http://interactivebrokers.github.io is required An exception has occurred, use %tb to see the full traceback.

I have checked that the labrary ib_insync is in the kernel.

Is there is something I could do more ?

Thanks

Prou Prou Tyu
  • 409
  • 1
  • 6
  • 16
  • Did you enable the api connection and set it to the correct port, https://interactivebrokers.github.io/tws-api/initial_setup.html#enable_api&gsc.tab=0? Also there is no help here for ib_insync, go to https://groups.io/g/insync/topics for help. – brian Nov 28 '17 at 21:47
  • You do need to install the IB API as per error message. ib_insync is a wrapper which uses the latest IB API for Python – steff Nov 29 '17 at 02:14

1 Answers1

1

Here is what worked for me. Sort of unnecessary "undocumented" step

After installing the IB API (on Windows it installs to C:\TWS API... on Mac / Linux you will unzip to your ~/ folder as per the instructions.)

Navigate to

    cd "C:\TWS API\TWS API\source\pythonclient"

and run the following command.

    python3  setup.py install
Surya
  • 41
  • 3