piker/dockering/ib
Tyler Goodlet 9b2dad31b5 Spawn a live account gateway alongside paper
This is like, super first-draft-y (and ideally we move to offering an
`piker.data._ahab` super for this) but, it's a start at allowing easy
setup of both paper and live `ib-gw` container spawning. We Expect the
user to input creds for the live account manually and the vnc server is
(hackily) only run inside the paper instance which most of the time
seems to make it possible click on the live gui window and input creds
manually.

We also add extra files for the live instance:
- a `dockering/ib/run_x11_vnc_live.sh` which is is a blank script
  that avoids running an `x11vnc` server in the line account cntr.
- a `dockering/ib/jts_live.ini` config which manually sets the live
  gw to use the `4001` port for api connections.

Further config tweaks:
- IBC: drop the api dynamic port override, decrease login display
  timeout to the riskier but likely to be faster 20s.
- `x11vnc` cmd: got back to using `rfbport` instead of `autoport`, drop
  `-logappend` so we see logging on docker console again, drop the
  frame cacheing flags and add in some x-hack disable flags.
2022-08-20 18:37:06 -04:00
..
README.rst Add readme for `ib-gw` container usage 2022-06-04 20:18:29 -04:00
docker-compose.yml Spawn a live account gateway alongside paper 2022-08-20 18:37:06 -04:00
fork_ports_delayed.sh Add working, template docker setup for `ib-gw` 2022-05-21 14:22:11 -04:00
ibc.ini Spawn a live account gateway alongside paper 2022-08-20 18:37:06 -04:00
jts.ini Flip tz to NY, add note about .env file 2022-05-24 09:29:35 -04:00
jts_live.ini Spawn a live account gateway alongside paper 2022-08-20 18:37:06 -04:00
run_x11_vnc.sh Spawn a live account gateway alongside paper 2022-08-20 18:37:06 -04:00
run_x11_vnc_live.sh Spawn a live account gateway alongside paper 2022-08-20 18:37:06 -04:00

README.rst

running ib gateway in docker

We have a config based on the (now defunct) image from "waytrade":

https://github.com/waytrade/ib-gateway-docker

To startup this image with our custom settings simply run the command:

docker compose up

And you should have the following socket-available services:

  • x11vnc1@127.0.0.1:3003
  • ib-gw@127.0.0.1:4002

You can attach to the container via a VNC client without password auth.

SECURITY STUFF!?!?!

Though "ib" claims they host filter connections outside localhost (aka 127.0.0.1) it's probably better if you filter the socket at the OS level using a stateless firewall rule:

ip rule add not unicast iif lo to 0.0.0.0/0 dport 4002

We will soon have this baked into our own custom image but for now you'll have to do it urself dawgy.