question

Upvotes
Accepted
38 5 10 18

Get data from RIC given parameters (case: ISIN from delisted RICs)

Hi,

I want to get the ISIN from a list of delisted RICS (not all but the majority).

From the help desk I got this answer, to get delisted information.

=@TR($B$2,"TR.ISIN","SDate=2021-03-31 EDate=2021-03-31 CH=Fd",$C$2)

Is it possible to prompt it via Python? How to handle the fact that for each RIC, I have a specific SDate and EDate.

The df looks something like this

1681977014116.png

So far, I have this.

df_isin = ek.get_data(df['Ric'],fields="TR.ISIN",   parameters = {'SDate':df['Sdate'], 'EDate': df['Edate']})
#contentpython apiisin
1681977014116.png (4.2 KiB)
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
6.1k 21 3 6

Hi @ricardo.henriquez ,

I suggest using the RD lib; this example in particular:

https://github.com/Refinitiv-API-Samples/Example.DataLibrary.Python/blob/7a7214499415005f52aec3cf3986cdf6e742292e/Examples/5-Eikon%20Data%20API/EX-5.04.01%20-%20Eikon%20Data%20API%20-%20Symbology.ipynb


If you have access to EDAPI (i.e.: in python via `ek.get_data`), you will have similar access to the RD lib.
If this does not meet your need, then I would suggest looking into the Search API (w service within the RD lib). More info here.


Let me know if this does not answer your question.

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
38 5 10 18

Thank you @jonathan.legrand for your previous assistance. However, I am still encountering problems with the delisted RICs.

To give an example, I have a historical RIC for ALZA CORP which is 'AZA.N'. Unfortunately, neither the get_symbology nor the get_data functions are returning a valid ISIN for this RIC. I had hoped that using the get_data parameters with the historical RIC would return a valid ISIN, but this did not work. Instead, the delisted RIC 'AZA.F^F01' provides a valid ISIN.

This returned an empty list.

aza=rdp.dataplatform.get_symbolog(
    ['AZA.N'], 
    from_symbol_type='RIC')

I thought that this method will do the mapping. But still returned an empty list.

aza=rd.get_data( ['AZA.N'], fields="TR.ISIN", parameters={'SDate':'2000-12-31', 'EDate':'2001-12-31'})

Searching directly into workspace, I found this delisted RIC which returned US0226151084

aza=rd.get_data( ['AZA.F^F01'], fields="TR.ISIN", parameters={'SDate':'2000-12-31', 'EDate':'2001-12-31'})

Is there a way to map a historical RIC to a delisted RIC in order to obtain a valid ISIN? I would greatly appreciate any further advice or suggestions you might have.

Thank you once again for your help.

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
25.3k 89 12 25

Hi @ricardo.henriquez

You should be able to use the Endpoint Interface within the RD Python Library and use the raw Symbology API to convert expired RICs such as "ZURZn.VX", "III.L" and "BGRO.KL" to ISINs

So, for example for III.L the Symbology API returned "GB0008886938", "GB00B0BL5R37" and some others - each with their effective from and effective to dates.

The query I used was:

https://api.refinitiv.com/discovery/symbology/v1/lookup with a request body of:
{
  "from": [
    {
      "identifierTypes": [
        "RIC"
      ],
      "values": [
        "ZURZn.VX",
        "III.L",
        "BGRO.KL"
      ]
    }
  ],
  "to": [
    {
      "identifierTypes": [
        "ISIN"
      ]
    }
  ],
  "reference": [
    "name",
    "status"
  ],
  "type": "auto",
  "showHistory": "true"
}

The RD Python library examples include an Endpoint notebook which has a Symbology sample included.

The above request is a simple one, but I can see from the API playground (should be able log in with your Eikon/Workspace creds) that does have some more advanced examples that you may find useful.

Sample response for III.L only:

{
  "data": [
    {
      "input": [
        {
          "value": "III.L",
          "identifierType": "RIC"
        }
      ],
      "output": [
        {
          "value": "GB0008886938",
          "identifierType": "ISIN",
          "statusHistory": [
            {
              "value": "Active",
              "effectiveFrom": "1994-07-16T00:00:00.000Z",
              "effectiveTo": "2005-07-08T17:32:02.000Z"
            }
          ]
        }
      ],
      "effectiveFrom": "1994-07-16T00:00:00.000Z",
      "effectiveTo": "2005-07-08T17:32:02.000Z"
    },
    {
      "input": [
        {
          "value": "III.L",
          "identifierType": "RIC"
        }
      ],
      "output": [
        {
          "value": "GB00B0BL5R37",
          "identifierType": "ISIN",
          "statusHistory": [
            {
              "value": "Active",
              "effectiveFrom": "2005-07-08T17:32:02.000Z",
              "effectiveTo": "2006-07-14T16:34:23.000Z"
            }
          ]
        }
      ],
      "effectiveFrom": "2005-07-08T17:32:02.000Z",
      "effectiveTo": "2006-07-14T16:34:23.000Z"
    },
  ],
...
and so on...
....
  "requestId": "284838fd-4219-4723-95a4-2c0ccfa59106",
  "effectiveAt": "2023-04-21T12:23:01.270Z",
  "messages": []
}


Note that you can limit the response to a particular point in time e.g. if I change the request parameters and replace the showHistory with an effectiveAt date - then you should only get back the ISINs for that date.

  "type": "auto",
  "effectiveAt": "2001-12-31T12:34:33.100Z" 
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.