I'm trying to pull all available bonds in an exchange(NYSE) from the Blomberg terminal via Python. I want to retrieve the various bond data fields like say(Option Adjusted Spread ,S&P Rating, Yield to Maturity, Sector).
How can I be able to achieve this either using xbbg or blpapi
?
In both of them from their docs you need the ticker option that is what I don't know how to navigate given I intend on referencing an exchange or different exchanges.
I've looked at this answer How to pull out the list of active German government bonds using xbbg?
but this is specific to local bonds.
From the Bloomberg docs as well I'm not clearly seeing from the "//blp/instruments"
endpoint instrumentListRequest
option how this can be achieved.
however I tried playing around with this by passing a sector as part of the query but clearly this is not right given it returns an empty results.
session.openService("//blp/instruments")
service = session.getService("//blp/instruments")
request = service.createRequest("instrumentListRequest")
request.set("query", "Corporate Bonds")
request.set("sector", "Corporate")
request.set("maxResults",10)
response = session.sendRequest(request)
any one whose had some experience with this?