New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR:ib_insync.wrapper:Error 10197, reqId..... No market data during competing live session #167
Comments
So I've run into this a few times unfortunately, and I'll share what has worked for me. I can't necessarily guarantee it'll help. Worst case, if you can't get it resolved, you can try opening a support ticket with IBKR, but they are pretty useless.
In my case, problem 3 (above) was an issue for me. I worked around it by using a WireGuard VPN which I start and stop before running ThetaGang. My IP is not consistent so IBKR has a fit any time I try to use their service. Without a VPN it does not work for me. I hope that helps. Let me know how it goes. |
I am using the docker image with the command I tried changing Now I get several different I don't believe I have any other IBKR sessions open at the moment, I tried this after a reboot, which you would think would kill all the sessions. It's possible I could get a different result next week if I try running this without any other logins at all, assuming they should timeout. -Update: I tried running the docker command after not making an IBKR login for 4 days, no change in behavior. I will keep an eye on my IP and see if that changes. -Update: My IP remains the same over the long weekend and the issue persists. Thanks for your help! |
@jbieberly are you using a standalone virtual machine, or are you using a WSL? Could you elaborate an easy way for a novice code to implement this bot easily to run all day on my windows tower? |
I'm using a Centos machine with KVM running another Centos VM. Since it is available as a Docker image it might be easiest to run it through the Windows Docker application for you. |
I've never really ran any code before like this. It gives me an error about not being able to find the ibc file and when I clone the repo from GitHub and edit it on vscode, I can't find the file system. Maybe a bit more tinkering. Also I see an ip setting and a few things that I'm not sure if I have to add their location to the bot config file too. |
It's a big leap to go from never using Docker to suddenly running something like this with Docker. My suggestion is to take some time to familiarize yourself with the tools. Specifically, this tool (when used with Docker) requires the use of volumes, as your configuration files need to be passed into the container in some way. Perhaps do a search on YouTube for "docker introduction", and re-read the official docs. I can tell you what commands to type, but you will keep hitting walls until you have a little more experience with the tools. I hope that helps. |
Well I know that docker is built with containers, I've watched a few videos but I don't really learn like that because people really don't explain things. I need this to work though, because I have 10 k and want to backtest this with 3 etfs I regularly sell premium on, but because my family kept me away from technology, i really have a hard time initializing things, i can navigate around the shell and cd into things, but like you said, walls. I pretty much have toe code either on my desktop in a folder and i try to open in a debian environment like that, and I've git cloned into vscode. Also used docker desktop and tried to use the cli to build like that but it says docker isn't recognized. Ill keep scanning youtube, or if you could get me started i could figure out the rest im sure. I know once i build the dockerfile, that it will install everything i need and then i can run the bot. |
I was able to get the app to work by installing it on my same VM I had configured to run the Docker image. So the issue I am having is only present while running with Docker. Probably this is what I should be doing anyway if I want to modify it or add something to the tool. |
https://www.docker.com/blog/docker-desktop-wsl-2-best-practices/ https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack I found this, and apparently vscode isn't really the best option. |
I'm not super familiar with running Docker on windows, but I think the best place to start is to follow the official Docker guide. It sounds like you already have Docker installed and working, which is a good start. Here's a guide to using volumes on windows. You'll need to create a directory somewhere on your machine with the necessary configuration files (thetagang.toml and config.ini). Start with the example configuration files from the repo (you shouldn't need to modify the config.ini file much, but you should go through thetagang.toml). |
I've updated the README with more detailed instructions here: https://github.com/brndnmtthws/thetagang#up-and-running-with-docker. Hopefully it's a little more clear how to use it. I'm going to close this issue now, please re-open a new issue if you continue to have problems. |
I promise you i will understand it after this part. I am in a WSL:ubuntu distro. Ive edited the file a little bit with my basic information, and have been using my ide and the terminal mostly for this. As far as all these paths? Im getting a build error as well about /etc/thetagang. should thetagang dir be made inside the /etc of my vm? Or one here and one in /etc? delos@DESKTOP-087HUSE:~/thetagang $ curl -Lq https://raw.githubusercontent.com/brndnmtthws/thetagang/main/thetagang.toml -o ~/thetagang/thetagang.toml delos@DESKTOP-087HUSE:~/thetagang$ $ curl -Lq https://raw.githubusercontent.com/brndnmtthws/thetagang/main/ibc-config.ini - ~/thetagang/config.ini delos@DESKTOP-087HUSE:~/thetagang$ curl -Lq https://raw.githubusercontent.com/brndnmtthws/thetagang/main/ibc-config.ini -o ~/thetagang/config.ini delos@DESKTOP-087HUSE:~/thetagang$ docker run --rm -it \
Unable to find image 'brndnmtthws/thetagang:latest' locally
Error: Invalid value for '-c' / '--config': Path '/etc/thetagang/thetagang.toml' does not exist. delos@DESKTOP-087HUSE:~/thetagang$ |
Change the command to: $ docker run --rm -it \
-v ~/thetagang:/etc/thetagang \
brndnmtthws/thetagang:latest \
--config /etc/thetagang/thetagang.toml And you should be good. I'll fix the README, that's an error. |
I have this set up in a VM and I'm trying to run the Docker container with TWS 978 on my paper trading account.
The Bot hangs on "Searching option chain for symbol=SPY right=P, this can take a while..."
The ib_insync.loglogs show an error:
ERROR:ib_insync.wrapper:Error 10197, reqId..... No market data during competing live session.
I've verified that all my other IBKR sessions are closed, also it is getting market data, current prices for SPY show up in the console and in the error message. I can launch TWS by itself and it gets market data successfully on the same paper account.
I found these two threads regarding the same error message, but none has a resolution:
https://groups.io/g/insync/topic/19741887
https://groups.io/g/twsapi/topic/24929715
The text was updated successfully, but these errors were encountered: