softwarespartan / IB4m

Interactive Brokers API for Matlab
GNU General Public License v2.0
62 stars 21 forks source link

Retrieving Bond contract details #71

Open dakr001 opened 5 years ago

dakr001 commented 5 years ago

Hi,

This is more of a question rather than issue but I don't know of any other suitable forum.

I would like to download bond historical data for many bonds but don't have the list of CUSIPs.

-For options, I can simply enter the underlying symbol and secType, and reqContractDetails would give me all the options related to the underlying. -In TWS you can enter US-T as the underlying in the monitor panel and it would return a list of US treasuries -I tried using 'US-T' as the underlying when using the API but no result was returned. -The symbols on the IB product list (see link below as example) for bonds doesn't work for finding bonds. Called up IB and they confirmed this. https://www.interactivebrokers.com/en/index.php?f=2222&exch=valubondg&showcategories=BOND&p=&cc=&limit=100&page=1 -Searched for a list of bond CUSIPS online but no luck.

Does anyone have any ideas?

Thanks.

Despair2000 commented 5 years ago

For questions regarding the TWS API not directly related to IB4m I recommend Groupsio.

https://groups.io/g/twsapi

dakr001 commented 5 years ago

Thank you.

ecpgieicg commented 4 years ago

As mentioned, this is not an IB4m question.

But what have you tried and what did you asked customer service? Did you ask for the symbol name under which you can identify a specific bond issue using API? This should be a question they are able to answer. And then, you can ask for the same identifiers for a few different issues. Since a .symbol field is always required in the contract object in a historical data request, I'd expect a pattern in symbol for US-T bonds.