How to get from Bloomberg unique id to ticker

Published on November 15th, 2020

It is possible to get from Bloomberg unique id to ticker without using a
Bloomberg Terminal. This is convenient, because you might not always have access to one. So, how do you do this? You can use the OpenFIGI API for that. Check out the (heavily simplified) example with Python below.

OpenFIGI logo

This code example works “as-is”, but you can only send 5 requests per minute for a limited amount of data. When you register for an API key, your limits will be increased to 250 requests per minute. 

Code example: Bloomberg unique id to ticker

import requests
 
API_KEY = ''  # Your API key (for higher rate limits)
 
url = 'https://api.openfigi.com/v2/mapping'
 
headers = {'X-OPENFIGI-APIKEY': API_KEY}
 
mapping = [{'idType': 'ID_BB_UNIQUE', 
            'idValue': 'EQ0018000100001000', 
            'exchCode': 'GR' }]
 
r = requests.post(url=url, 
                  headers=headers,
                  json=mapping).json()
print(r)

The output is a (nested) list with dictionaries. Therefore you can easily get the ticker or other identifiers from the response. For example, the full company name and security type are also in there.

[{'data': [{'figi': 'BBG000FR1Q22',
    'name': 'ADIDAS AG',
    'ticker': 'ADS',
    'exchCode': 'GR',
    'compositeFIGI': 'BBG000FR1Q22',
    'uniqueID': 'EQ0018000100001000',
    'securityType': 'Common Stock',
    'marketSector': 'Equity',
    'shareClassFIGI': 'BBG001S8J8Q3',
    'uniqueIDFutOpt': None,
    'securityType2': 'Common Stock',
    'securityDescription': 'ADS'}]}]

This example is simplified and just for illustrative purposes. It doesn’t include any error handling. For a more elaborate example, check out the tutorial Financial Market Instruments – Unique Identifiers. If you are using Eikon, you might be interested in Eikon & Python: time series for EURO STOXX 50 index.

Conclusion

In conclusion, yes: it is easy to get from Bloomberg unique id to ticker with Python. You only need an OpenFIGI API key. If you prefer to use another programming language, it shouldn’t be very hard to translate the example above. If you have any questions or comments, you can leave them in the comment section below. Happy coding!

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.