Interactive Broker's TWS software has a way of showing trading day information, i.e. if the exchange was closed for this day and if open what the trading hours where. See here: https://www.interactivebrokers.com/en/index.php?f=22063
How do I retrieve this information via the relatively new TWS API?
I could not find it anywhere in the docs.
reqContractDetails(id, contract) will return a contractDetails object with tradingHours as a field.
Here's a sample of using the new API. Just call reqContractDetails instead of market data. There's a EWrapper callback for contractDetailsEnd that will be called when the API is finished sending data as there may be more than one contract.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With