Hello,
Could someone conduct the following test on this workstation and tell me if he receives the delayed market data (delayed bid price / delayed ask prices) for all the instruments.
In my case, I don't receive the delayed bid/ask prices for many options. But If I open the TWS option chain for TESLA first, then I receive the data via the API.
I'd like to know if someone else has the same issue.
This is a small modification of the C++ sample provided by IB.
[NEED TO BE DONE ON A WORKSTATION WITHOUT A REAL TIME SUBSCRIPTION, AS IT WORKS WHEN A REAL TIME SUBSCRIPTION FOR US OPTIONS IS IN PLACE]
In fact the test is quite basic, I do quickly 20 reqMktData requests for options on which I don't have a realtime subscription. But I make a request for delayed data so in theory it should work.
? ? ? ? m_pClient->reqMarketDataType(4); // send delayed-frozen (4) market data type
m_pClient->reqMktData(2100, ContractSamples::USOptionContract("20220121", "C", 400), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2101, ContractSamples::USOptionContract("20220121", "C", 450), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2102, ContractSamples::USOptionContract("20220121", "C", 500), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2103, ContractSamples::USOptionContract("20220121", "C", 550), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2104, ContractSamples::USOptionContract("20220121", "C", 570), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2105, ContractSamples::USOptionContract("20220121", "C", 600), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2106, ContractSamples::USOptionContract("20220121", "C", 620), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2107, ContractSamples::USOptionContract("20220121", "C", 650), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2108, ContractSamples::USOptionContract("20220121", "C", 670), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2109, ContractSamples::USOptionContract("20220121", "C", 680), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2110, ContractSamples::USOptionContract("20220121", "C", 690), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2111, ContractSamples::USOptionContract("20220121", "C", 700), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2112, ContractSamples::USOptionContract("20220121", "C", 710), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2113, ContractSamples::USOptionContract("20220121", "C", 720), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2114, ContractSamples::USOptionContract("20220121", "C", 730), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2115, ContractSamples::USOptionContract("20220121", "C", 740), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2116, ContractSamples::USOptionContract("20220121", "C", 750), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2117, ContractSamples::USOptionContract("20220121", "C", 760), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2118, ContractSamples::USOptionContract("20220121", "C", 770), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2119, ContractSamples::USOptionContract("20220121", "C", 780), "", false, false, TagValueListSPtr());
m_pClient->reqMktData(2120, ContractSamples::USOptionContract("20220121", "C", 790), "", false, false, TagValueListSPtr());
where?
Contract ContractSamples::USOptionContract(const std::string& maturityAsString, const std::string& callorput, double strike){
Contract contract;
contract.symbol = "TSLA";
contract.secType = "OPT";
contract.exchange = "SMART";
contract.currency = "USD";
contract.lastTradeDateOrContractMonth = maturityAsString; // = "20220121";
contract.strike = strike;
contract.right = callorput; // "C";
contract.multiplier = "100";
return contract;
?
}
Thank you forward for any feedback