Giter VIP home page Giter VIP logo

Comments (5)

areed1192 avatar areed1192 commented on June 15, 2024

Thanks for bringing this up. It's more than likely cause because you installed the library using PyPI. If you install using PyPI I found out that it wasn't downloading the client portal gateway like it was intended to. I went back and modified the library so that it will download and create the folder if needed.

Update it to the latest version (0.1.2) and let me know if it fixes the issue for you.

pip install interactive-broker-python-web-api==0.1.2

from interactive-broker-python-api.

ghcmartins avatar ghcmartins commented on June 15, 2024

Hi1 Thanks for the answer, I updated the package, but it still answers with this error, what I saw different was 5that when calling ib_client.create_session() it brought another issue. Iยดm using Trader Workstation desktop, do I need to use the IB gateway only?

ib_client.close_session()

The Client Portal Gateway doesn't exist. You need to download it before using the Library.
Downloading the Client Portal file...

Traceback (most recent call last):

  File "<ipython-input-1-da1f5388ae55>", line 10, in <module>
    ib_client.create_session()

  File "C:\Users\User\anaconda3-64bit\lib\site-packages\ibw\client.py", line 150, in create_session
    self.connect(start_server=True)

  File "C:\Users\User\anaconda3-64bit\lib\site-packages\ibw\client.py", line 459, in connect
    server_state = self._start_server()

  File "C:\Users\User\anaconda3-64bit\lib\site-packages\ibw\client.py", line 426, in _start_server
    creationflags=subprocess.CREATE_NEW_CONSOLE

NotADirectoryError: [WinError 267] The directory name is invalid

from interactive-broker-python-api.

areed1192 avatar areed1192 commented on June 15, 2024

First, did you download the clientportal gateway before running the script?

Also, I don't know why, but I noticed you are using spyder. I would recommend against using that for the time being when using this library. I'm not sure why but there seem to be errors that only appear when using spyder. I need to take a look into it and see what the issue is.

from interactive-broker-python-api.

thepian avatar thepian commented on June 15, 2024

I don't see anywhere what you do with the client portal once downloaded. I have it in the working directory, but I suppose it's supposed to be installed somehow. What I downloaded is called 'clientportal', but it seems your lib expects a different directory name to be under resources.

from interactive-broker-python-api.

dhecloud avatar dhecloud commented on June 15, 2024

@thepian when you create your ibclient, you have to specify the path to your gate.

ib_client = IBClient(username=REGULAR_USERNAME, account=REGULAR_ACCOUNT, client_gateway_path='clientportal.beta.gw')

from interactive-broker-python-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.