Using the Python IBAPI, this small app requests positions every 15 seconds from the IB servers. One problem I had while trying to figure out the IBAPI was finding a way to execute logic while receiving server messages. The answer, it turns out, was multithreading! Follow the link below for more info on threading.
https://www.tutorialspoint.com/python/python_multithreading.htm