Hello,
I am in the process of developing my automated trading platform (unix c++) that will interface with the IB TWS API (I'm very early in the process). Right now I am working with a demo account to work out all of the bugs in my software out. I have been able to succefully get quotes and place trades for stocks and options, but am having trouble with futures and currencies.
I get the following error when I perform m_pClient->reqContractDetails(2000,MyContract)
"Error id=2000, errorCode=200, msg=No security definition has been found for the request"
MyContract is defined as follows for the futures contract:
MyContract.symbol = "6EZ3"; // CME Euro-USD fture
MyContract.secType = "FUT";
MyContract.expiry = "201312"; // I have also tried 20131216, which is what tws lists
MyContract.strike = 0.0; // This shouldn't matter...
MyContract.right = ""; // Not defining this.... shouldnt matter
MyContract.multiplier = "125000";
MyContract.exchange = "GLOBEX";
MyContract.currency = "USD";
And MyContract is defined as follows for the FOREX contract.
MyContract.symbol = "EUR.USD"; // FOREX EUR/USD
MyContract.secType = "CASH";
MyContract.expiry = ""; // I have also tried 20131216, which is what tws lists
MyContract.strike = 0.0; // This shouldn't matter...
MyContract.right = ""; // Not defining this.... shouldnt matter
MyContract.multiplier = "";
MyContract.exchange = "IDEALPRO";
MyContract.currency = "USD";
What am I doing wrong? Any help would be greatly appreciated!!
Thanks,
Brad
I am in the process of developing my automated trading platform (unix c++) that will interface with the IB TWS API (I'm very early in the process). Right now I am working with a demo account to work out all of the bugs in my software out. I have been able to succefully get quotes and place trades for stocks and options, but am having trouble with futures and currencies.
I get the following error when I perform m_pClient->reqContractDetails(2000,MyContract)
"Error id=2000, errorCode=200, msg=No security definition has been found for the request"
MyContract is defined as follows for the futures contract:
MyContract.symbol = "6EZ3"; // CME Euro-USD fture
MyContract.secType = "FUT";
MyContract.expiry = "201312"; // I have also tried 20131216, which is what tws lists
MyContract.strike = 0.0; // This shouldn't matter...
MyContract.right = ""; // Not defining this.... shouldnt matter
MyContract.multiplier = "125000";
MyContract.exchange = "GLOBEX";
MyContract.currency = "USD";
And MyContract is defined as follows for the FOREX contract.
MyContract.symbol = "EUR.USD"; // FOREX EUR/USD
MyContract.secType = "CASH";
MyContract.expiry = ""; // I have also tried 20131216, which is what tws lists
MyContract.strike = 0.0; // This shouldn't matter...
MyContract.right = ""; // Not defining this.... shouldnt matter
MyContract.multiplier = "";
MyContract.exchange = "IDEALPRO";
MyContract.currency = "USD";
What am I doing wrong? Any help would be greatly appreciated!!
Thanks,
Brad