Currently to Fetch Fixed Income Data on the Bloomberg terminal directly I use the SRCH option in the terminal and select Asset Class Governments and corporates. The query that gets executed which I get from Bloomberg is:
Prefetch the Government and Corporates bonds using JPY,USD and GBR for Maturtiy upto 20 years And the rating Above BBB
I came across this question get data from bloomberg api with python via excel
and tried something almost similar however this doesn't work given I'm having a challenge on how to write the query to send to excel.
query = """="BSRCH("Asset Classes=Corporate|Goverments","fields = id_isin|maturity|OAS_Spread_bid|")"""
Also, I tried the blapi library but nothing in the docs shows the use of SRCH hence i decided to try the excel route. Anyone with experience on this?