admin

Connect Trading Account with Interactive Brokers

How it work


In connection with Interactive Brokers, users can now trade with IB accounts using ALGOGENE dedicated trading gateway!

collaborate_ib

This article goes through the steps to connect ALGOGENE with your Interactive Brokers (IB) trading account (either demo account or real trading account). The overall workflow is summarized in this diagram.

workflow

Who is IB?

Interactive Brokers LLC (IB) is a brokerage firm headquartered in the United States, with 40+ years history. It operates the largest electronic trading platform in the U.S. by number of daily average revenue trades. The company brokers stocks, options, futures, futures options, forex, bonds, and funds. It is a current NASDAQ listed company (symbol: IBKR) and a composite of S&P 400 Component, with global operations in 14 countries.


Open IB Account

In case you do not have an IB account, you can firstly open one from Interactive Brokers Official Website.


Create sub-account on IB

You are advise to create sub-account to manage different trading strategies.

  • Login IB portal, click "Manage Account" under settings
  • manage_account

  • Click "Open an Additional Account"
  • additional account

  • Follow the instructions for sub-account creation
  • sub account

  • After that, it will take a few days for IB to approve the new sub-account.
  • additional account

Create a separate user on IB

By creating a separate user login, it allows you to have simultaneous access to your trading account from different devices (eg. mobile, website, etc).

  • Login IB portal, click "Manage Account" under settings
  • manage_account

  • Under "Users & Access Rights", click "Configure"
  • configure_account

  • Add new user
  • new_user

  • Create new user's credentials
  • new_credential

  • Enable data access for the new user
  • access_alert
    access_trade
    access_report

  • Login IB protal with the new user and password to confirm
  • access_confirm

Update Account Type on IB

By default, your IB account type is in "Cash". You are recommended to change to "margin" type to enable advanced securities trading. (eg. FX, Future, Options, CFD, etc)

  • After login IB portal, click 'Settings'

  • Then, click 'Account Type'

  • Update to 'Margin'

Create IB Paper Trading Account

If you don't have IB paper trading account, you can create as follows:

  • login IB portal using your real account login
  • in top right corner, click settings

  • click "Paper Trading Account" and then create the demo account login

Authenticate with ALGOGENE

  • login ALGOGENE portal
  • Under [Settings], go to [Trade Account], then [Live Demo] or [Real Trade] depending on your case
  • choose a desired ALGOGENE account for connection configuration
  • select "Interactive Brokers" in the available broker list
  • select_ib

  • You will then be redirected to IB's login panel
  • authorize_ib

  • If you are linking with an ALGOGENE Real Trade account, login with "Live", otherwise login with "Paper".
  • Then, you will be asked to electronically sign to autheticate the connection
  • sign_ib

  • After that, you will be redirected back to ALGOGENE, and you account is ready to trade!
  • success

Deploy Algo

After successful connection from above, you are now ready to deploy and trade an Algo with Interactive Brokers.

1. Deploy from a DIY script

  • Under ALGOGENE 'settings', choose your IB linked account
  • algogene_deploy

  • deploy any one of your backtested script
  • algogene_deploy2

2. Deploy from algo marketplace subscription

  • Explore available trading bots from ALGOGENE Marketplace
  • Choose a desired trading bot, click "SUBSCRIBE"
  • Select your desired "Run Mode" and "Account", then click "SUBMIT"
  • subcribe

  • Go to [Setting] > [Algo Market] > [My Subscribed Algo Strategy], you should see your subscribed Algo is active in trading for you. You have the feasibility to "Stop copy trade" and "Start copy trade" at any time.
  • start


Demo Video



Happy Trading! :)


 
Gupta
what is the advantage over TWS?
 
admin
Original Posted by - b'Gupta': what is the advantage over TWS?
Some of the benefits included, but not limited to:

  1. your algo program are cloud-hosted over ALGOGENE => no client side hardware maintenance
  2. free market data feed => cost saving from separate IB's data purchase
  3. you can directly deploy a backtested strategy to IB trading account => largely speed up your trading algorithm R&D process
 
Gupta
Original Posted by - b'admin':
Some of the benefits included, but not limited to:

  1. your algo program are cloud-hosted over ALGOGENE => no client side hardware maintenance
  2. free market data feed => cost saving from separate IB's data purchase
  3. you can directly deploy a backtested strategy to IB trading account => largely speed up your trading algorithm R&D process
How about the execution speed?
 
admin
Original Posted by - b'Gupta': How about the execution speed?
As a technology partner with IB, there is a dedicated trading gateway for data exchange. 
From IB's server side, it would be a separate order queue compared to other submission channels. (eg. TWS)
Thus, it is likely to be faster to execute via ALGOGENE. 

 
Bee Bee
Original Posted by - b'admin':
Some of the benefits included, but not limited to:

  1. your algo program are cloud-hosted over ALGOGENE => no client side hardware maintenance
  2. free market data feed => cost saving from separate IB's data purchase
  3. you can directly deploy a backtested strategy to IB trading account => largely speed up your trading algorithm R&D process
It is really a good alternative for TWS. :)

My IB sale always refers me to use TWS gateway for algo trading, which is said to be a lightweight software for normal PC. However, my experience is that, the gateway can sometimes use up to 500MB - 1GB memory. My PC sometimes hangs and I can't use it when my algo program and TWS are running, 
 
Nezuko
For TWS, it requires users to re-login every day. 
Do I need to do the same thing using your IB connection? 
 
admin
Original Posted by - b'Nezuko': For TWS, it requires users to re-login every day. 
Do I need to do the same thing using your IB connection? 
Unlike TWS, the login session established using our trading gateway is long lasting. It means that you don't need to frequently authenticate the IB login. The login session once established, it can normally be used for over 3-6 months. 
However, for sometimes when IB reset database, the login session will become invalid. For such case, you will receive our notification email and need to authenticate following the same procedures above. 
 
Maurice Ng
Very detailed guide! Thanks you!
 
admin

For those who are looking for leveraged FX trading on IB, please further setup as follows:

  1. Login IB portal, go to "Settings"
  2. settings

  3. Click "Trading Permissions"
  4. settings

  5. Click "Add/Edit" for "Currency/Forex"
  6. settings

  7. Click to enable "Leveraged Forex"
  8. settings

  9. The request will be effective in 24 hours
  10. settings