user11344107
user11344107

Reputation:

installing the ibapi package

Hi I am trying to install ibapi in python however the package seems to be unavailable because there is an error every time I try to install it is there another way I can install this package . Your help will be greatly appreciated. I have left the code I used. to try and install the package

pip install ibapi

Upvotes: 7

Views: 18286

Answers (5)

Hayden
Hayden

Reputation: 19

The official Interactive Brokers API is only offered through their Github site and not the Python Package Index (PyPI) because it's distributed under a different license. You can however build a wheel from the provided source code and then install the wheel. These are the steps, follow them precisely for the most updated TWS API version on windows machine. The latest answer was very confusing:

  1. Download "API Latest" from http://interactivebrokers.github.io/

  2. Unzip or install (if its a .msi file) the download.

  3. Go to C:/tws-api/source/pythonclient/ in command prompt

  4. Install wheel package with: python3 -m pip install wheel

  5. Build a wheel with: python3 setup.py bdist_wheel

  6. Install wheel with: python3 -m pip install --user --upgrade dist/ibapi-10.19.2-py3-none-any.whl

  7. Check install with: python -m pip show ibapi

Upvotes: 0

VengaVenga
VengaVenga

Reputation: 760

Here a step by step setup instructions for Windows:

  1. Download and install TWS Gateway or Client
  2. Download and install Python to C:\Program Files\python... (and not the suggested ...\user\App... - gives you some more flexibility)
  3. Setup additional PATH environment variables (see pip warnings)
  4. Install wheel, i.e. type in the command line: py -m pip install wheel
  5. Download "API Latest" (or latest version that contains python) from http://interactivebrokers.github.io/ and install into the folder X as proposed (but for python the directory shouldn't matter)
  6. Go to X/.../source/pythonclient/ (cd in command line)
  7. Build a wheel, i.e. py setup.py bdist_wheel
  8. Look up the whl file in folder ./dist: should be something like ibapi-9.7x.x..
  9. Install the wheel, i.e. py -m pip install --user --upgrade dist/ibapi-9.73.7-py3-none-any.whl

Upvotes: 12

Josh
Josh

Reputation: 816

The official Interactive Brokers API is only offered through their Github site and not the Python Package Index (PyPI) because its distributed under a different license. You can however build a wheel from the provided source code and then install the wheel. These are the steps:

1) Download "API Latest" from http://interactivebrokers.github.io/

2) Unzip or install (if its a .msi file) the download.

3) Go to tws-api/source/pythonclient/

4) Build a wheel with: python3 setup.py bdist_wheel

5) Install the wheel with:

python3 -m pip install --user --upgrade dist/ibapi-9.73.7-py3-none-any.whl

Upvotes: 25

Alex
Alex

Reputation: 516

A pip search of the term ibapi only returns two packages.

ibapi-grease (0.2.0)  - Monkey patches to grease the Interactive Brokers Python API
tws-async (0.5.7)     - Use the Interactive Brokers API (IBAPI) asynchonously with asyncio or PyQt5

If you pip search for ib however, more Interactive Brokers related packages appear, which might be might you are looking for. Packages like:

ib-tools (0.1)
ib-wrapper (0.1.0)
ib (0.8.0)
ib-api (0.9.70)
ib-client (0.1.2)
ib-dl (1.5.3)
ib-insync (0.9.56)
ib-python (0.0.1)
ib-trading-calendars (0.1.2)
ibdb (0.0.0a4)

Upvotes: -4

Derek Eden
Derek Eden

Reputation: 4618

there is no pypi package called "ibapi"

if this is the one you are after : https://pypi.org/project/ibapi-grease/

then do

pip install ibapi-grease

or

https://pypi.org/project/ib-api/

pip install ib-api

Upvotes: -5

Related Questions