I just started using Interactive Brokers because of their API. I'm using the IBrokers package in R.
I've managed to get data for S&P 500 and other indices but now I want data for S&P 500 after hours.
Investing.com shows data for S&P 500 after hours (S&P 500 futures). How can I get this data by using Interactive brokers API?
Update
I just tried this without success. I only get data for regular trading hours.
spx = reqHistoricalData(tws2, twsIndex(symbol = "SPX", exch = "CBOE"),
barSize = "15 mins",
duration = "1 M",
useRTH = "0")
Am I doing something wrong?