Hi Karl,
Thank you for a great API. I started using the IB JAVA API but as I know very little about JAVA had a tough time with it. Using your API, Visual Studio Express and C# I have made a lot of progress in a much shorter time even as a DOT NET newbie.
To the point. I'm trying to match contract info between the client events and my application. I wanted the ContractId and wrote the following:
int EStickerId = 201;
string expiration = "200809"
ES = new Contract("ES", "GLOBEX", SecurityType.Future, "USD", expiration);
client.RequestMarketData(EStickerId, ES, null, false);
int EScontractId = ES.ContractId;
expecting to get the ContractId in EScontractId but I get 0. I looked at the definition of Contract.ContractId and don't see it being set. I haven't checked (& don't really want to!) the JAVA API to see if that returns the right value. I have a workaround which gets the ContractId from the client_UpdatePortFolio event using e.Contract.ContractId but I have no guarantee that I will get client_UpdatePortFolio event ...
Any help in getting the ContractId immediately after client.RequestMarketData would be much appreciated.
Ian