Fetch Instruments and Quotes through PermID.org

RaphaelS
RaphaelS Newcomer
edited January 27 in Open PermID

Hi, I'm exploring the public API on permid.org. I do have a list of LEI's for a bunch of companies. My task is to get all traded instruments (if there is more than one) and their respective trading venues.
I managed to map the entity to my LEI and I also get the primary instrument and quote of said entity.

Where I do not have a solution is the identification of other instruments and quotes related to that entitiy. Is there a way to achieve this?

Best Answer

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @RaphaelS

    Thank you for reaching out to us.

    I assumed that you are using the OpenPerm APIs.

    You can use the Recording Matching to match LEIs to organization PermIDs.

    organization="""
    LocalID,Standard Identifier,Name,Country,Street,City,PostalCode,State,Website
    1,LEI:549300QOGMPTKB6W7G56,,,,,,,
    2,LEI:VGRQXHF3J8VDLUA7XE92,,,,,,,
    """
    output,err = opid.match(organization,dataType="Organization", raw_output=False)
    output
    
    image.png

    Then, for each match OpenPermID, you can use the Look Up to get the hasOrganizationPrimaryQuote.

    output,err = opid.lookup("1-4295893306", orient="column", format='dataframe')
    output
    
    image.png

    Finally, use the Look Up with the Quote PermIDs to get a primary RIC.

    output,err = opid.lookup("1-55838847808", orient="column", format='dataframe')
    output
    
    image.png

    I am using the OpemPermID Python library.

  • RaphaelS
    RaphaelS Newcomer

    @Jirapongse thank you very much for your detailed answer. Also I didn't know there is an library available.

    It seems though I was not very clear.

    What I CAN do:

    • Get entity through LEI
    • Get primary instrument
    • Get primary quote

    What I CAN NOT do:

    • Get other instruments for entity (let's say there are more than one share class I can not search for the second). I tried the API search endpoint searching explicitly for instruments (entityType=instrument). But it seems one can only search with names and not with the parents permID.
    • The same is true for quotes. For example: if we search for Logitech International I can't find their listing in the US through search. Again: I can search with the instrument name but they are not identical for all instruments and I'm missing a way (as with instruments) to refer to the quotes parent permID which in this case would be the instruments permID.

    The problem with the name search is (if we stay with Logitech International S.A.) that I will find the instruments and quotes if I shorten the search term to "Logitech". Unfortunately this will also return a bunch of unrelated results. I like to be able to explicitly seach for childs / parents.

    Any idea how to solve this?

    Kind regards

    Raphael

    PS: are there any information on rate limits?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @RaphaelS

    Please check the PermID API User Guide regarding how to use the entity search API.

    For the limitations, please check the FAQ page.

    image.png
  • RaphaelS
    RaphaelS Newcomer

    Dear @Jirapongse

    I read the API User guide before posting here but some things are still unclear to me.

    For example: On page 13 we see a list of search fields that we can pass into the query. A few lines below we see an example where the mic code is used (while the mic iteself is not in the table above). So i scrolled down to page 40, where I see the mic as well as other fields that (based on the given example) are searchable.

    So by assuming, that the same is true for instruments I checked on page 39 and learned, that the fieldname must be "issuer".

    So i put together this request (to get all instruments for logitech, which has PermID 4295890536.

    import requests
    permIdParams = {'entityType': 'instrument', 'q': 'issuer:https://permid.org/1-4295890536', 'access-token': <my-token>, 'format': 'JSON'}
    permIdResponse = requests.get('https://api-eit.refinitiv.com/permid/search', params=permIdParams)
    

    But unfortunately, nothing is returned. I also tried 1-4295890536 and 4295890536 as lookup, but without success so far.

    I'm wondering if the PermID API allows for traversing from entiity to all instruments and all of the related quotes and vice versa (which I understand is one of it's goals).

    I'm wondering if "issuer" is the right field to use, or if it even allows for quering? Any help would be appreciated. KR