psemdel / py-trading-bot

Trading-bot in python using django, vertorbt lib and interactive-brokers
MIT License
141 stars 34 forks source link

How to access IB gateway from Linux #10

Closed ben1628 closed 1 year ago

ben1628 commented 1 year ago

Where do you run your IB Gateway or TWS?

I'm using wsl2 and run IB Gateway on my windows 10, I have difficulty trying to connect to it from wsl2 (linux), It keeps on saying connection failed.

Thanks.

psemdel commented 1 year ago

Can you give more detail? I use TWS in Linux personally. For the connection, I completely rely on ib_insync.

ben1628 commented 1 year ago

Oh, Ic, you are running TWS in Linux. I'll figure it out myself, thanks.

psemdel commented 1 year ago

Good notice though, I always used TWS and don't know well IB Gateway. To deploy the bot on "production", IB Gateway could be an idea. ib_sync supports both anyhow. One more point in my backlog.

ben1628 commented 1 year ago

I know both quite well, and actually have been using it with C# with lots of success. However, I am now into python, vectorbt pro. Because of your project, I'm going to linux which I haven't been using it for quite a while, but I actually love it.

Lots to learn, but it's fun.

ben1628 commented 1 year ago

Ok, I have found the solution.

https://github.com/erdewit/ib_insync/issues/529#issuecomment-1397255851

@psemdel, I start using your project, may be we can work together to improve this and share ideas, PM me in Discord @ben1628. Thanks

psemdel commented 1 year ago

I am not as fast as you, but I will definitely try it. IB gateway is actually the right software (not TWS) for our purpose.