newbee questions: to get the market quote for 10 yr bond futures ZN.

Hi, hope someone with more experience could help me on this. I am having trouble with getting the market/historical data for ZN in the Interactivebrokers TWS c-api ( have no problem with other futures).

My setup is

Contract c;
c.symbol="ZN";
C.secType = *SecType::FUT;
C.exchange = *Exchange::E_CBOT;
C.primaryExchange = *Exchange::E_CBOT;
C.expiry="201306";

The error message that I got is

"200 = Invalid destination exchange specified"

Many thanks
 
Quote from pepper_john:
C.exchange = *Exchange::E_CBOT;
C.primaryExchange = *Exchange::E_CBOT;
Try "ECBOT" for exchange. In general, what works in the TWS usually works in the API too.
 
Quote from pepper_john:
thanks, tried it but got the same error message.
I just tried it with edemo/demouser, and it works for me. I ran this test program: C:\Jts\TestActiveXClient_VC\Release\client3.exe
 
Quote from rwk:

I just tried it with edemo/demouser, and it works for me. I ran this test program: C:\Jts\TestActiveXClient_VC\Release\client3.exe

thanks. will check it against my version.
 
Back
Top