question

Upvotes
Accepted
2 1 1 3

Is there a programatic way to get a RIC for a given ticker?

If I know a ticker, for example, IBM, is there a way to translate this to a RIC via a webservice call? I see there are facilities to convert to open permID, but there seems to be no way to map together RICs and Open PermID with Tickers. Again , looking to convert Tickers to RICs.

thanks

ricspermid-apiintelligent-tagging-apiopen-permid-apisymbology
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.

Upvotes
Accepted
79.2k 251 52 74

I can use the following python code to get RICs from a ticker.

def main():
    if len(sys.argv) < 2:
        print ('Please enter unique access key as 1st command line parameter')
        sys.exit(1)
    url = 'https://api.thomsonreuters.com/permid/search?q=ticker:IBM'
    access_token = sys.argv[1]
    headers = {'X-AG-Access-Token' : access_token}
    try:
        print ('connecting to %s' % url)
        response = requests.get(url, headers=headers)
    except Exception  as e:
        print ('Error in connect ' , e)
        return
    print ('Status code: %s' % response.status_code)
    if response.status_code == 200:
        print ('Results received: %s' % response.text)


if __name__ == "__main__":
   main() 

It uses Entity Search API. This script requires Token as a parameter.

The response is:

{
    "result": {
        "organizations": {
            "entityType": "organizations",
            "total": 1,
            "start": 1,
            "num": 1,
            "entities": [
                {
                    "@id": "https://permid.org/1-4295904307",
                    "organizationName": "International Business Machines Corp",
                    "primaryTicker": "IBM",
                    "orgSubtype": "Company",
                    "hasHoldingClassification": "publiclyHeld",
                    "hasURL": "http://www.ibm.com/"
                }
            ]
        },
        "instruments": {
            "entityType": "instruments",
            "total": 2,
            "start": 1,
            "num": 2,
            "entities": [
                {
                    "@id": "https://permid.org/1-8590927768",
                    "hasName": "International Business Machines Ord Shs",
                    "assetClass": "Ordinary Shares",
                    "isIssuedByName": "International Business Machines Corp",
                    "isIssuedBy": "https://permid.org/1-4295904307",
                    "hasPrimaryQuote": "https://permid.org/1-55838323096",
                    "primaryTicker": "IBM"
                },
                {
                    "@id": "https://permid.org/1-8590327310",
                    "hasName": "International Business Machines CEDEAR",
                    "assetClass": "Argentinian Depository Receipts",
                    "isIssuedByName": "International Business Machines Corp",
                    "isIssuedBy": "https://permid.org/1-4295904307",
                    "hasPrimaryQuote": "https://permid.org/1-55838283585",
                    "primaryTicker": "IBM"
                }
            ]
        },
        "quotes": {
            "entityType": "quotes",
            "total": 41,
            "start": 1,
            "num": 5,
            "entities": [
                {
                    "@id": "https://permid.org/1-55838323096",
                    "hasName": "INTERNATIONAL BUSINESS MACHINES ORD",
                    "assetClass": "Ordinary Shares",
                    "isQuoteOfInstrumentName": "International Business Machines Ord Shs",
                    "hasRIC": "IBM.N",
                    "hasMic": "XNYS",
                    "hasExchangeTicker": "IBM",
                    "isQuoteOf": "https://permid.org/1-8590927768"
                },
                {
                    "@id": "https://permid.org/1-55839165994",
                    "hasName": "INTERNATIONAL BUSINESS MACHINES ORD",
                    "assetClass": "Ordinary Shares",
                    "isQuoteOfInstrumentName": "International Business Machines Ord Shs",
                    "hasRIC": "IBM",
                    "hasMic": "XXXX",
                    "hasExchangeTicker": "IBM",
                    "isQuoteOf": "https://permid.org/1-8590927768"
                },
                {
                    "@id": "https://permid.org/1-55838283585",
                    "hasName": "IBM CEDEAR",
                    "assetClass": "Argentinian Depository Receipts",
                    "isQuoteOfInstrumentName": "International Business Machines EDEAR",
                    "hasRIC": "IBM.BA",
                    "hasMic": "XBUE",
                    "hasExchangeTicker": "IBM",
                    "isQuoteOf": "https://permid.org/1-8590327310"
                },
                {
                    "@id": "https://permid.org/1-21475582828",
                    "hasName": "IBM ORD",
                    "assetClass": "Ordinary Shares",
                    "isQuoteOfInstrumentName": "International Business Machines Ord Shs",
                    "hasRIC": "IBM.B^J07",
                    "hasExchangeTicker": "IBM",
                    "isQuoteOf": "https://permid.org/1-8590927768"
                },
                {
                    "@id": "https://permid.org/1-21475582861",
                    "hasName": "IBM ORD",
                    "assetClass": "Ordinary Shares",
                    "isQuoteOfInstrumentName": "International Business Machines Ord Shs",
                    "hasRIC": "IBM.S^K08",
                    "hasExchangeTicker": "IBM",
                    "isQuoteOf": "https://permid.org/1-8590927768"
                }
            ]
        }
    }
}

For more information, please refer to Entity Search User Guide at https://developers.thomsonreuters.com/open-permid/open-permid-entity-search/docs.

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.

You can use the following query to get one item from entity type quote.

url = 'https://api.thomsonreuters.com/permid/search?q=IBM&num=1&entityType=quote'
Upvotes
2 1 1 3
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.