If you want to write a trading bot on Interactive Brokers, this is what the first stage of set up looks like.
This is a beginners tutorial – it’s a walkthrough of the sample Java application they provide, complete with a UI that lets us explore their API capabilities. It’s a javax.swing UI that’s kind of terrible and super confusing, but it *does* work, so credit to Interactive Brokers for providing some sample code… even if there was no README.
If you want to sign up to Interactive Brokers and get some free stocks: https://ibkr.com/referral/rachel449
This runs the TestJavaClient in the IBJTs Samples Java folder hierarchy. I’m using Trader Workstation on MacOS with the Interactive Brokers Java API, but it’s probably the same on Windows or Linux, or with their C++ or Python code 🤷️.
Starting point (IBKR API documentation and source): https://interactivebrokers.github.io/tws-api/initial_setup.html
Hope this How To guide was helpful!
A stream of my trading thoughts: https://twitter.com/racheldoji
00:00 – Intro
00:36 – Documentation and API download
01:04 – Setting up IntelliJ
02:02 – Running the sample application
03:08 – Connecting to TWS Trader Workstation
03:36 – Getting a snapshot of market data for a stock
04:56 – Getting historical data for a stock
05:54 – Getting live updates for a stock
06:30 – Placing an order through the API