Thanks for the reply richard.
? When I send requests to the ib server, sometimes the data returns just fine, sometimes I get error 'Connectivity between IBKR and Trader Workstation has been lost' followed by? 'No security defintion has been found for the request'. I'm wondering what's causing this? and how should I handle this?