areed1192 / interactive-broker-python-api

A python packaged used to interact with the Interactive Brokers REST API.
MIT License
374 stars 122 forks source link

The requested URL /v1/portal/calendar/events/ was not found on this server. #3

Closed wuliwei9278 closed 4 years ago

wuliwei9278 commented 4 years ago

I am having problem having access to the web api despite that i follow the instructions on https://interactivebrokers.github.io/cpwebapi/ and got Client login succeeds. please help. the error message is: The requested URL /v1/portal/calendar/events/ was not found on this server.

areed1192 commented 4 years ago

Hi there, that particular endpoint won't work with the API library. I removed it from the library since it was an experimental endpoint.

wuliwei9278 commented 4 years ago

Hi there, that particular endpoint won't work with the API library. I removed it from the library since it was an experimental endpoint.

It is not actually this particular endpoint. I cannot access any endpoint successfully.

5tomato commented 4 years ago

@areed1192 Thank you so much for writing this tool! I find it very useful, and the videos going along with it are very instructional for me.

I have been having the same problem as wulwei9278, where I can log in, but all of the URLs for any of the nodes after that return 404 errors. I am also using a Mac, so not sure if that has anything to do with it.

Another thing I have noted with Mac is that the open Terminal command with subprocess in the connect() function does not seem to allow the run.sh script to take in the config.yaml file as an argument. Instead of open I was able to get it to work using osascript, but not sure if it records the process ID correctly or how to check that.

Thanks for any feedback you have!

areed1192 commented 4 years ago

Gotcha, I think this is a Mac-specific issue. I wrote it using a windows platform so I wrote what I thought would be the Mac equivalent. @5tomato could you possibly share the code you wrote that got the script to work?

I would like to open the terminal and display the server in a separate console as I do in Windows using subprocess. The joys of working on multiple operating systems :)

5tomato commented 4 years ago

@areed1192 I didn't do too much, just changed how the terminal is opened. From what I can tell the process ID is correct, and the terminal opens in a new console. Here's the code:

image

I still haven't been able to get the _make_post function to return anything from the server, I get <Response [404]>. And when I type in the URLs for the nodes themselves I also get 404 errors.

Thanks again!

5tomato commented 4 years ago

Just an update: It appears to be a CORB issue or Access-Control-Allow-Origin, so is not related specifically to this repository. I have a Windows partition on my computer, and the same server errors are received when running the server on Windows.

Update to the update: I looked through the log files in the clientportal folder, turns out that's a great resource! The issue is that the base url for the server has changed.

Instead of being: https://localhost:5000/v1/portal

The new base url is: https://localhost:5000/v1/api

wuliwei9278 commented 4 years ago

Just an update: It appears to be a CORB issue or Access-Control-Allow-Origin, so is not related specifically to this repository. I have a Windows partition on my computer, and the same server errors are received when running the server on Windows.

Update to the update: I looked through the log files in the clientportal folder, turns out that's a great resource! The issue is that the base url for the server has changed.

Instead of being: https://localhost:5000/v1/portal

The new base url is: https://localhost:5000/v1/api

Very cool! Wrong api url is the issue for me as well. Yeah it is not the CORB issue, which would only arise if you try to call the api using the IB provided buttons. I don't know how I missed the log files. Should have looked at them first!