All Projects → Voyz → ibeam

Voyz / ibeam

Licence: Apache-2.0 license
IBeam is an authentication and maintenance tool used for the Interactive Brokers Client Portal Web API Gateway.

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
shell
77523 projects
Batchfile
5799 projects
HTML
75241 projects

Projects that are alternatives of or similar to ibeam

ibkr
Interactive Brokers wrapper 🚩
Stars: ✭ 34 (-86.07%)
Mutual labels:  interactive-brokers, ibkr-api, ibkr
InterReact
Interactive Brokers reactive C# API.
Stars: ✭ 28 (-88.52%)
Mutual labels:  interactive-brokers, ibkr
QuickStart-admin-Cloud
基于spring boot 2.0.8 目前集成了spring security oauth2 (server and client)、springboot-admin、openfeign、hystrix,zuul(后续会替换成gateway),config.....等组件
Stars: ✭ 25 (-89.75%)
Mutual labels:  gateway
piccolo
Netty4长连接网关
Stars: ✭ 19 (-92.21%)
Mutual labels:  gateway
prop
An open and opinionated trading platform using productive & familiar open source libraries and tools for strategy research, execution and operation.
Stars: ✭ 26 (-89.34%)
Mutual labels:  algo-trading
cashier
Cashier is an Elixir library that aims to be an easy to use payment gateway, whilst offering the fault tolerance and scalability benefits of being built on top of Erlang/OTP
Stars: ✭ 43 (-82.38%)
Mutual labels:  gateway
torbox
Container-based Tor access point (Anonymizing Middlebox).
Stars: ✭ 52 (-78.69%)
Mutual labels:  gateway
gateway
API proxy gateway base on netty and okHttp.
Stars: ✭ 21 (-91.39%)
Mutual labels:  gateway
gnatsd-gw
A utility pkg make it easy to write a gateway in front of gnatsd with middlewares
Stars: ✭ 16 (-93.44%)
Mutual labels:  gateway
ib dl
Historical market data downloader using Interactive Brokers TWS
Stars: ✭ 43 (-82.38%)
Mutual labels:  interactive-brokers
gateway.js
The gateway to Discord.
Stars: ✭ 23 (-90.57%)
Mutual labels:  gateway
mbed-edge
The Mbed Edge
Stars: ✭ 24 (-90.16%)
Mutual labels:  gateway
scimgateway
Using SCIM protocol as a gateway for user provisioning to other endpoints
Stars: ✭ 98 (-59.84%)
Mutual labels:  gateway
emerald-web3-gateway
The Web3 Gateway for the Oasis Emerald ParaTime.
Stars: ✭ 19 (-92.21%)
Mutual labels:  gateway
LoraGW-Setup
SX1301 Lora Concentrator Raspberry PI based gateway setup
Stars: ✭ 70 (-71.31%)
Mutual labels:  gateway
laravel-viva-payments
A Laravel package for integrating the Viva Payments gateway
Stars: ✭ 29 (-88.11%)
Mutual labels:  gateway
SerialToTCPBridgeProtocol
An error tolerant serial UART to TCP connection, raw data bridge.
Stars: ✭ 16 (-93.44%)
Mutual labels:  gateway
ib-edavki
Skripta, ki prevede XML poročilo trgovalnih poslov v platformi InteractiveBrokers v XML format primeren za uvoz v obrazce Doh-KDVP, D-IFI, Doh-Div in Doh-Obr v eDavkih Finančne uprave.
Stars: ✭ 63 (-74.18%)
Mutual labels:  interactive-brokers
RAK831-Zero
Pi Zero RAK831 Adapter board
Stars: ✭ 98 (-59.84%)
Mutual labels:  gateway
Consul.ServiceDiscovery.Demo
This demo shows how to implement simple containerized (Docker) microservice architecture with gateway, load balancer (Ocelot) and automatic service discovery (Consul).
Stars: ✭ 24 (-90.16%)
Mutual labels:  gateway

This library is currently being beta-tested. See something that's broken? Did we get something wrong? Create an issue and let us know!

IBeam logo

IBeam is an authentication and maintenance tool used for the Interactive Brokers Client Portal Web API Gateway.

Features:

  • Facilitates continuous headless run of the Gateway.

  • No physical display required - virtual display buffer can be used instead.

  • No interaction from the user required - automated injection of IBKR credentials into the authentication page used by the Gateway.

  • TLS certificate support - you can provide your own certificates.

  • Containerised using Docker - it's a plug and play image, although IBeam can be used as standalone too.

  • Not so secure - Yupp, you'll need to store the credentials somewhere, and that's a risk. Read more about it in Security.

Documentation:

IBeam showcase gif

Quick start

Installation

Docker Image (Recommended):

docker pull voyz/ibeam

Standalone:

pip install ibeam

Startup

Docker Image (Recommended):

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

docker-compose:

Create a docker-compose.yml file with the following contents:

version: "2.1"

services:
  ibeam:
    image: voyz/ibeam
    container_name: ibeam
    env_file:
      - env.list
    ports:
      - 5000:5000
    network_mode: bridge # Required due to clientportal.gw IP whitelist
    restart: 'no' # Prevents IBEAM_MAX_FAILED_AUTH from being exceeded

Create an env.list file in the same directory with the following contents:

IBEAM_ACCOUNT=your_account123
IBEAM_PASSWORD=your_password123

Run the following command:

docker-compose up -d

Standalone:

python ibeam_starter.py

Once started, verify the Gateway is running by calling:

curl -X GET "https://localhost:5000/v1/api/one/user" -k

Read more in Installation and Startup.

How does IBeam work?

In a standard startup IBeam performs the following:

  1. Copy inputs from the Inputs Directory to Gateway's root folder (if provided).
  2. Ensure the Gateway is running by calling the tickle endpoint. If not:
    1. Start the Gateway in a new shell.
  3. Ensure the Gateway has an active session that is authenticated by calling the tickle endpoint. If not:
    1. Create a new Chrome Driver instance using selenium.
    2. Start a virtual display using pyvirtualdisplay.
    3. Access the Gateway's authentication website.
    4. Once loaded, input username and password and submit the form.
    5. Wait for the login confirmation and quit the website.
    6. Verify once again if Gateway is running and authenticated.
  4. Start the maintenance, attempting to keep the Gateway alive and authenticated. Will repeat login if finds no active session or the session is not authenticated.

Security

Please feel free to suggest improvements to the security risks currently present in IBeam and the Gateway by opening an issue on GitHub.

Credentials

The Gateway requires credentials to be provided on a regular basis. The only way to avoid manually having to input them every time is to store the credentials somewhere. This alone is a security risk.

Currently, IBeam expects the credentials to be available as environment variables during runtime. Whether running IBeam in a container or directly on a host machine, an unwanted user may gain access to these credentials. If your setup is exposed to a risk of someone unauthorised reading the credentials, you may want to look for other solutions than IBeam or use the Gateway standalone and authenticate manually each time.

We considered providing a possibility to read the credentials from an external credentials store, such as GCP Secrets, yet that would require some authentication credentials too, which brings back the same issue it was to solve.

Roadmap

IBeam was built by traders just like you. We made it open source in order to collectively build a reliable solution. If you enjoy using IBeam, we encourage you to attempt implementing one of the following tasks:

  • Include TLS certificates.
  • Two Factor Authentictaion.
  • Remove necessity to install Java.
  • Remove necessity to install Chrome or find a lighter replacement.
  • Add usage examples.
  • Full test coverage.
  • Improve the security issues.
  • Find a lighter replacement to using Chromium

Read the CONTRIBUTING guideline to get started.


Licence

See LICENSE

Disclaimer

IBeam is not built, maintained, or endorsed by the Interactive Brokers.

Use at own discretion. IBeam and its authors give no guarantee of uninterrupted run of and access to the Interactive Brokers Client Portal Web API Gateway. You should prepare for breaks in connectivity to IBKR servers and should not depend on continuous uninterrupted run of the Gateway. IBeam requires your private credentials to be exposed to a security risk, potentially resulting in, although not limited to interruptions, loss of capital and loss of access to your account. To partially reduce the potential risk use Paper Account credentials.

IBeam is provided on an AS IS and AS AVAILABLE basis without any representation or endorsement made and without warranty of any kind whether express or implied, including but not limited to the implied warranties of satisfactory quality, fitness for a particular purpose, non-infringement, compatibility, security and accuracy. To the extent permitted by law, IBeam's authors will not be liable for any indirect or consequential loss or damage whatever (including without limitation loss of business, opportunity, data, profits) arising out of or in connection with the use of IBeam. IBeam's authors make no warranty that the functionality of IBeam will be uninterrupted or error free, that defects will be corrected or that IBeam or the server that makes it available are free of viruses or anything else which may be harmful or destructive.

Built by Voy

Hi! Thanks for checking out and using this library. If you are interested in discussing your project, require mentorship, consider hiring me, or just wanna chat - I'm happy to talk.

You can send me an email to get in touch: [email protected]

Or if you'd just want to give something back, I've got a Buy Me A Coffee account:

Buy Me A Coffee

Thanks and have an awesome day 👋

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].