To start algo trading, it is recommended that you open an account with Interactive Broker (IB) or at least get a demo account to access to real-time market data and historical data.
Then, download 3 programs below to be ready for algo coding.
First Setup IB Gateway
Before you can get market data or sending orders. First of all you need to log-in to IB Gateway application and make some changes on the configuration.
Select “IB API” option and enter your credential. You can select “Live Trading” or “Paper Trading” for real-trade or simulate-trade respectively.
After log-in, you should see the green status “Connected“. Then, Click “Configuration” menu and go to API section.
Make sure you un-check “Read-only API” to allow Python to send orders to IB and change port to “7496” for IBridgePy to work correctly.