If you're trading with Interactive Brokers, I suggest you check out QTPyLib - a Pythonic algorithmic trading library that handles everything for you, including market data retrieval, trading logic, order management and reporting.
Now granted, I'm a bit biased (as I'm the one who wrote it), but...