I would like to connect with the TWS API for python however when I tried there was an error saying unable to connect with TWS and that I need to make sure that the TWS port is open. I am unsure what they mean by this.
This is some of my code:
from ib_insync import *
util.startLoop()
ib=IB()
ib.connect("127.001", 7497)