12

What is best API to lookup ISINs by number or name?

In other words, ideally I would like to have an rest-api like this:

http://api.isinlookup.org/filter={"isin":"US38259P5089"} ->
[
  {
    "isin": "US38259P5089"
    "name": "Google Inc.",
    "type": "Equity"
  }
]

http://api.isinlookup.org/filter={"name":"Google"} ->
[
  {
    "isin": "US38259P5089"
    "name": "Google Inc.",
    "type": "Equity"
  },
  ...
]
Thorben Croisé
  • 221
  • 1
  • 2
  • 4

3 Answers3

14

Try OpenFIGI (formerly the Bloomberg Global Identifier - BBGID)

amsh
  • 788
  • 1
  • 5
  • 16
3

Coming rather late to this party and because I've been researching the same (or at least similar) question, I'd like to share my solutions:

First provider

I've signed up (for free) at lemon.markets to request an API key. Following their documentation you can use the REST API to e.g. query for a certain ISIN with the latest quotes, e.g.

https://data.lemon.markets/v1/quotes/latest?isin=LU0629459743

which results in

{
    "status": "ok",
    "time": "2022-12-17T20:33:45.654+00:00",
    "results": [
        {
            "isin": "LU0629459743",
            "b_v": 190,
            "a_v": 190,
            "b": 108.62,
            "a": 108.78,
            "t": "2022-12-16T20:59:55.000+00:00",
            "mic": "XMUN"
        }
    ],
    "previous": null,
    "next": null,
    "total": 1,
    "page": 1,
    "pages": 1
}

Alternatively, you can also query historical data for certain dates (and times), e.g.:

https://data.lemon.markets/v1/quotes?isin=LU0629459743&from=2022-01-03T00:00:00.000%2B0000&limit=1

{
    "status": "ok",
    "time": "2022-12-17T20:34:59.288+00:00",
    "results": [
        {
            "isin": "LU0629459743",
            "b_v": 80,
            "a_v": 80,
            "b": 134.72,
            "a": 135.44,
            "t": "2022-01-03T07:43:37.000+00:00",
            "mic": "XMUN"
        }
    ],
    "previous": null,
    "next": "https://data.lemon.markets/v1/quotes?isin=lu0629459743&from=2022-01-03T00%3A00%3A00.000%2B0000&limit=1&page=2",
    "total": 22003,
    "page": 1,
    "pages": 22003
}

Note (1): You need to request an API key and send it with the request, so just clicking on the links above without that information won't work

Note (2): You won't get any data for days that aren't business days for the stock exchange, so make sure to take that into account

Second provider

A second provider is leeway.tech - you also have to sign up for a free API key and then use this query to find out your Symbol and Exchange

https://api.leeway.tech/api/v1/public/general/isin/LU0629459743?apitoken=token-goes-here

[
  {
    "Code": "UC44",
    "Exchange": "LSE",
    "Name": "UBS MSCI World Socially Responsible UCITS USD A-dis",
    "Type": "ETF",
    "ISIN": "LU0629459743",
    "previousClose": 9449,
    "previousCloseDate": "2022-12-16",
    "countryName": "UK",
    "currencyCode": "GBX"
  },
 ...
 {
    "Code": "WSRUSA",
    "Exchange": "SW",
    "Name": "UBS MSCI World Socially Responsible UCITS USD A-dis",
    "Type": "ETF",
    "ISIN": "LU0629459743",
    "previousClose": 107.6,
    "previousCloseDate": "2022-12-16",
    "countryName": "Switzerland",
    "currencyCode": "CHF"
  }
]

Then choose your Symbol from the response (here it is Code) and the Exchange and query for historical quotes:

https://api.leeway.tech/api/v1/public/historicalquotes/WSRUSA.SW?apitoken=token-goes-here&from=2022-01-03&to=2022-01-03

[
  {
    "date": "2022-01-03",
    "open": 135.48,
    "high": 135.98,
    "low": 134.78,
    "close": 135.2,
    "adjusted_close": 133.5272,
    "volume": 127570
  }
]
Gorgsenegger
  • 131
  • 4
  • As lemon.markets is shutting down it's API, have you found any free alternatives? For me it is pretty impossible to find one. I am thinking about creating my own server and automatically feed it delayed data (e.g. from gettex) which contains ISINs. On openFIGI you can convert ISINs to tickers/ company names but not vice-versa. Do you know a better alternative? – Gianluca Filitz Apr 19 '23 at 10:23
  • @GianlucaFilitz did you tree the second solution? – Gorgsenegger Apr 19 '23 at 11:57
  • leeway is not free anymore. – Gianluca Filitz Apr 24 '23 at 14:44
  • @GianlucaFilitz Ah, I see, unfortunate. A quick search came up with https://finnhub.io/ and https://marketstack.com/ which both seem to offer a somewhat limited free access. I suggest you start there and try it out. – Gorgsenegger Apr 24 '23 at 18:11
2

A solution would be to use Palmy Investing‘s Stocks API. Here are four examples: 2 more general (Quotes)& 2 specific for receiving id, ticker, isin and company name as response by passing isin/company name as parameters

# For python as an example

import requests

base = "https://palmy-investing.com/api/v1/stocks"

lookup = "?isin=US38259P5089" lookup_company = "?company=Alphabet"

quote_by_isin = base + "/quote" + lookup quote_by_company = base + "/quote" + lookup_company

basic_information_by_isin = base + "/tickers" + lookup basic_information_by_company = base + "/tickers" + lookup_company

def request_url(url: str, API_KEY: str): headers = {"Authorization": f"Token {API_KEY}"} response = requests.get(url) return response.text

When we execute this code with you‘re credentials as token:

pprint.pprint(request_url(quote_by_company, token))
{
    "count":1,"next":null,"previous":null,
    "results": [{'ads': None,
          'company': 'Alphabet Inc.',
          'eps': 4.55,
          'evaluation': None,
          'fws': None,
          'id': 447,
          'last_update': '2023-06-14T15:17:38.951111Z',
          'lts': None,
          'market_cap': 1576639062659,
          'pe_ratio': 27.37,
          'price': 124.54,
          'ps': None,
          'ticker': 'GOOG'},
}

Same as pprint.pprint(request_url(quote_by_isin, token))

The following two are also equal regarding their response:

pprint.pprint(request_url(basic_information_by_isin, token)) pprint.pprint(request_url(basic_information_by_company, token))

[{'company': 'Alphabet Inc.', 'id': 404, 'isin': 'US38259P5089', 'ticker': 'GOOG'}]

Here‘s a link about how to receive an API token for free:

[https://palmy-investing.com/docs/api/auth][Token]

Note that there are some limitations:

  • Yet not munch data, Testing stage
  • Not working for every asset classes, exclusive for stocks as OP mentioned Google

Also note that I am the project dev& therefore biased, but I commented working code& answered the question regarding a free alternative.