question

Upvotes
1 0 0 1

How to dissect and show US Municipal Bonds' CUSIP in API?

import refinitiv.data as rd

rd.open_session()

response = rd.discovery.search(
view=rd.discovery.Views.MUNICIPAL_INSTRUMENTS,
filter = "(IsActive eq true and SearchAllCategoryv2 eq 'US Municipal Bonds')",
top = 10000,
select = "CUSIP"
)

print(response)


Tried this but it is reaching the limit, client wants to see the next securities adter the 10,000

eikoneikon-data-apiworkspaceworkspace-data-api#technologyapipython api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
11.1k 22 6 9

@marceugene.belen Thanks for your question - so yes the universe size is almost a million rows:

1730832325922.png

So you will need to add some new filters in there to split this down much further to accomodate the 10k return limit. Some ideas could be to split the universe in to monthly maturity date buckets and you will likely also need to split by letter of issuer eg issuername begins with A and expires in 11/25.

Please see our expanded search samples and this article. I hope this can help.



1730832325922.png (47.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.