-
Notifications
You must be signed in to change notification settings - Fork 138
Runtime environment
Whether running using an image or as standalone, IBeam expects IBKR credentials to be provided as environment variables. We recommend you start using IBeam with your paper account credentials, and only switch to production account once you're ready to trade.
-
IBEAM_ACCOUNT
- IBKR account name -
IBEAM_PASSWORD
- IBKR account password
IBeam expects an optional third credential IBEAM_KEY
. If provided, it will be used to decrypt the password given in the IBEAM_PASSWORD
variable. cryptography.fernet decryption is used, therefore to encrypt your password use:
from cryptography.fernet import Fernet
key = Fernet.generate_key()
f = Fernet(key)
password = f.encrypt(b"your_ibkr_password123")
print(f'IBEAM_PASSWORD={password}, IBEAM_KEY={key}')
If any of the required credentials environment variables is not found, user will be prompted to enter them directly in the terminal.
For example your credentials may be set as:
IBEAM_ACCOUNT=my_account_name
IBEAM_PASSWORD=6562ni6b2ui23tg2brugb52iugb25
IBEAM_KEY=1694jgd39sij443426
When running standalone, IBeam requires the following to be present:
Additionally, the following environment variables:
-
IBEAM_CHROME_DRIVER_PATH
- path to the Chome Driver executable -
IBEAM_GATEWAY_DIR
- path to the root of the Gateway
Note that you can chose to not use the ibeam_starter.py
script and instantiate and use the ibeam.gateway_client.GatewayClient
directly in your script instead. This way you will be able to provide any of the credentials, as well as the Chrome Driver and Gateway paths directly upon construction of the GatewayClient
.
Learn about Inputs And Outputs and IBeam Configuration
See any error on this page? Create an Issue and let us know.