matthewgilbert / blp

Pythonic interface for Bloomberg Open API
Apache License 2.0
112 stars 24 forks source link

bsrch #13

Open gioxc88 opened 2 years ago

gioxc88 commented 2 years ago

Hello and thanks for the new release Is there no support for bsrch? Could you eventually give some hint on how to use the blpapi directly to retrieve isins from SRCH ?

many thanks Gio

matthewgilbert commented 2 years ago

This could be added to the BlpQuery class in a similar way to how bds and bdh are implemented. The relevant service endpoint that is wrapped is ExcelGetGridRequest. There is a discussion of the schema layout here https://github.com/matthewgilbert/pdblp/issues/68. Open to PRs but I have no plans to implement this in the immediate future.

gioxc88 commented 2 years ago

thanks for the answer, can I ask in your opinion between blp and pdblp which one is more "mature" to use? Thanks

matthewgilbert commented 2 years ago

blp is a much better architected design than pdblp as discussed here https://github.com/matthewgilbert/blp#about. That being said neither is under active development by me at this time. It would be much easier to subclass blp and add new services (or submit an issue and PR for the feature you want)

heyarn01d commented 11 months ago

Would you be able to provide any guidance on how to implement, what was discussed here https://github.com/matthewgilbert/pdblp/issues/68 into the latest version of blp?

MarekOzana commented 5 months ago

There is no need to implement bsrch since one can obtain SRCH results using blp.BlpQuery().bql(). For instance, the code below retrieves all ISINs for CoCo bonds by invoking the saved search @CoCo (one of example SRCHs in Bloomberg):

from blp import blp

with blp.BlpQuery() as bq:
    data = bq.bql(
        """
        for(screenresults(type=SRCH, screen_name='@COCO'))
        get(id_isin)
        """
    )