I am using the IB supplied binaries (activeX version and socket client) that come with the API version 8.30. When I click on connect, accept the connection in standalone TWS version 848.8, then request historical data for say ES, FUT, 200509 etc etc, the program crashes with a The instruction at "0x000000" referenced memory at "0x00000". The memory could not be read. Looks like trying to access unallocated memory. I am running Java 1.4.2_06. Does anyone know why the example programs don't work and what is required to get them working? Thanks nitro
What is even stranger is that when I try to rebuild the application, the button that requests Historical Data is not there anymore. It is as if they sent out a binary that does not match the source. nitro
Never tried the samples, and wouldn't touch ActiveX with a barge pole, but with Java, I found that if you don't fill in the fields in the Contract object properly (ie leave some null), you will get exceptions. This Java code fragment seems to be sufficient and work for stocks and futures in US, European and Asian markets Contract c = new Contract (); c.m_symbol = inst.ticker; c.m_secType = inst.type; c.m_expiry = inst.expiry; c.m_strike = 0; c.m_right = ""; c.m_currency = inst.currency; c.m_localSymbol = ""; c.m_exchange = new String (inst.exchange); c.m_primaryExch = new String (inst.exchange); c.m_multiplier = ""; I think all the above fields are necessary. You may like to check how the sample is filling these in. Overall the 1 week backfill seems to work OK for me.
Thanks, Interesting. I got it to work by upgrading to the beta version 8.52. Couldn't get the 8.30 API (non-beta) to work. nitro