extrange/ibkr-docker

Market data sharing of concurrent live and paper sessions

Closed this issue · 1 comments

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?

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

exec /opt/ibc/scripts/ibcstart.sh "${TWS_MAJOR_VERSION}" $command \
"--user=${USERNAME:-}" \
"--pw=${PASSWORD:-}" \
"--on2fatimeout=${TWOFA_TIMEOUT_ACTION:-restart}" \
"--tws-settings-path=${TWS_SETTINGS_PATH:-}"
to run both TWS and IB Gateway.