Comments (5)
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.
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.
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.
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.
@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)
- How to get "secType" for an order
- How often do we need to authenticate? HOT 3
- TypeError: __init__() got an unexpected keyword argument 'is_server_running' HOT 4
- 401 returned on portfolio_account_positions call HOT 1
- api for BONDS ? HOT 2
- HTTPError when request fundamentals_financials HOT 1
- macOS Terminal opening but not running the authentication HOT 4
- issue "no module name IBW" error
- private methods
- Place order reply should accept `reply` as bool HOT 1
- More Order Samples! HOT 2
- When i try to place a Preview LMT order, i am getting {'error': 'Invalid order price fields'
- Implementing streaming market data HOT 1
- Update PyPi distribution
- Authentication
- Unable to create session due to validation URL failing. HOT 1
- COULD NOT CREATE A NEW SESSION THAT WAS AUTHENTICATED, EXITING SCRIPT. HOT 1
- Can anyone provide me with a sample order for Options? HOT 1
- This API no longer works: New one HOT 1
- Too bad it is no longer update. I like it is simple and direct. I have added starting IB gateway in Ubuntu if anyone like it too.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interactive-broker-python-api.