I am using blpapi to find all the instruments under curve index
def curveListRequest(): #Return all govts with the given ticker, matured or not
req = create_request(service='//blp/instruments', request='curveListRequest')
req.set("query","SOFR") #keep it empty to find all
req.set("maxResults", 10)
result following
result CID: {[ valueType=AUTOGEN classId=0 value=3 ]}
RequestId: 9b3f7e8a-0e3b-4b7b-a7b4-c499e9f4b2a3
CurveListResponse = {
results[] = {
results = {
curve = "YCSW0490 Index"
description = "USD SOFR (vs. FIXED RATE)"
country = "US"
currency = "USD"
curveid = "S490"
type[] = {
IRS
}
subtype[] = {
RATE
}
publisher = "Bloomberg"
bbgid = ""
}
results = {
curve = "YCGT0806 Index"
description = "US SOFR Swap Spreads Curve"
country = "US"
currency = "USD"
curveid = "I806"
type[] = {
IRS
}
subtype[] = {
SPREAD, SPREAD
}
publisher = "Bloomberg"
bbgid = ""
}
}
}
Now i want to search for all the available securities under curve index such as YCSW0490 Index
i am assuming i need to use this but i am unable to find security under any of the curve index
def allInstruments(): #Return all govts with the given ticker, matured or not
req = create_request(service='//blp/instruments', request='instrumentListRequest')
req.set('query', "")
req.set('maxResults', 10)
Once you have the curve ticker eg
YCSW0490 Index
then use either of the bulk data fields (CURVE_TENOR_RATES
orPAR_CURVE
) and extract the curve members using the xbbg functionbds()
:which yields (partially, in Jupyter):