Squished_bunny
Newbie
- Messages
- 2
- Likes
- 0
Hi,
I've been using a java open source project (IBDownloader) to succesfully download historical prices for Forex from InteractiveBrokers.
https://github.com/mattrobust/IBDownloadHistoricalData
I modified the program to download the Dow Jones Industrial Avg (INDU @ NYSE), however the calls to the API appear to hang (ie. no response after 2min). Normally the IB API errors if I incorrectly call it, but it's not even doing that.
Can someone please check what I'm doing below and let me know if I'm doing something wrong?
The client log for the IB Gateway then looks like this...
15:24:06:076 <- 20-6-0-0-INDU-IND--0.0---NYSE-NYSE-USD---0-20151106 12:00:00-1 min-1 D-1-MIDPOINT-1--
15:24:06:069 -> 4-2--1-2119-Market data farm is connecting:usfarm.us-
15:24:07:336 -> 4-2--1-2104-Market data farm connection is OK:usfarm.us-
I've been using a java open source project (IBDownloader) to succesfully download historical prices for Forex from InteractiveBrokers.
https://github.com/mattrobust/IBDownloadHistoricalData
I modified the program to download the Dow Jones Industrial Avg (INDU @ NYSE), however the calls to the API appear to hang (ie. no response after 2min). Normally the IB API errors if I incorrectly call it, but it's not even doing that.
Can someone please check what I'm doing below and let me know if I'm doing something wrong?
Code:
// create a contract
mExchange = "NYSE"
mBaseCurrency = "USD"
mSymbol = "INDU"
mContract = new Contract(0, mSymbol, "IND", "",
0, "", "",
mExchange, mBaseCurrency, "", "",
new Vector<ComboLeg>(), mExchange, false,
"", "");
mRequestField = "MIDPOINT"
// make the call to fetch the data
mClient.reqHistoricalData( 0, mContract,
requestDateTimeStr, "1 D", //request in 1 day blocks
"1 min", mRequestField,
1, 1, null);
The client log for the IB Gateway then looks like this...
15:24:06:076 <- 20-6-0-0-INDU-IND--0.0---NYSE-NYSE-USD---0-20151106 12:00:00-1 min-1 D-1-MIDPOINT-1--
15:24:06:069 -> 4-2--1-2119-Market data farm is connecting:usfarm.us-
15:24:07:336 -> 4-2--1-2104-Market data farm connection is OK:usfarm.us-