Skip to content

Installation and startup

voyz edited this page Jan 31, 2022 · 8 revisions

Installation

Docker image (recommended):

docker pull voyz/ibeam

Standalone:

pip install ibeam

Startup

Using Docker image (recommended)

IBeam's Docker image is configured to work out of the box. Run the IBeam image exposing the port 5000 and providing the environment variable credentials either directly or through a file.

Using env.list file:

docker run --env-file env.list -p 5000:5000 voyz/ibeam

Providing environment variables directly:

docker run --env IBEAM_ACCOUNT=your_account123 --env IBEAM_PASSWORD=your_password123 -p 5000:5000 voyz/ibeam

Verify the Gateway is running inside of the container by calling:

curl -X GET "https://localhost:5000/v1/api/portfolio/accounts" -k

Standalone

The entrypoint of IBeam is the ibeam_starter.py script. When called without any arguments, the script will start the Gateway (if not currently running) and will attempt to authenticate (if not currently authenticated).

python ibeam_starter.py

Note that you will need additional environment requirements to run IBeam standalone. Read more about it in Standalone Environment

Following exclusive flags can be provided when running the starter script:

  • -a, --authenticate - Authenticate the currently running gateway.
  • -k, --kill - Kill the gateway.
  • -m, --maintain - Maintain the gateway.
  • -s, --start - Start the gateway if not already running.
  • -t, --tickle - Tickle the gateway.
  • -u, --user - Get the user info.
  • -c, --check - Check if session is authenticated.

Additionally the following flag can be supplied with any other flags to log additional runtime information:

  • -v, --verbose - More verbose output.

Verify the Gateway is running as standalone by calling:

curl -X GET "https://localhost:5000/v1/api/portfolio/accounts" -k

Once started

Once the Gateway is running and authenticated you can communicate with it like you would normally. Please refer to Interactive Brokers' documentation for more.

IBeam comes with an example verify_connection.py file which performs basic communication with the Gateway using commonly available libraries.


Next

Learn about Runtime Environment