【How 2】Set Up Trading API Template In Python — Connecting My Trading Strategies To Interactive Brokers

Michael Hsia
9 min readDec 11, 2022

Building your trading strategy to connect to a broker with the broker’s proprietary API is always dreadful. There are tones of API documentation to read, tones of trial-and-error tests to conduct, and tones of unknown causes and bugs that fail your API test. In this post, I’m going to demonstrate my MVP API template to get my trading strategies to work, so that you can build your own in a way that makes your trading strategies work as well.

Previous researches

After completing the research CPPI investment strategy, I need to find a new broker with a new account to start trading. Interactive Broker (IBKR) is the first broker that I am familiar with when I was a student, so I kinda have this obsession to make my trades through…

--

--

Michael Hsia

A quant trader who loves researching and technology and rock n' roll