extrange / ibkr-docker

Run IBKR Gateway/TWS in a Docker container
157 stars 34 forks source link

Market data sharing of concurrent live and paper sessions #102

Closed handelsmeisterei closed 1 month ago

handelsmeisterei commented 2 months ago

I have a problem with ibkr-docker which I cannot wrap my head around:

IB allows sharing of market data between live and paper trading accounts as long as both TWS/Gateway run on the same machine. This unfortunately does not work when using docker, because each container counts as a different machine for IB.

As I have a live trading container that I do not want to stop while I am testing some new stuff in paper trading, this is a severe problem for me. Are there any ideas how I could run two TWS instances from within one container or other solutions?

extrange commented 1 month ago

This has been discussed previously in #64, and unfortunately I don't have the bandwidth to write the solution at present.

One way to start would be to modify https://github.com/extrange/ibkr-docker/blob/5888b5eeb0de8394a5cad3b712601bdc1ac5bc9a/image-files/start.sh#L64-L68 to run both TWS and IB Gateway.