Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 2 3

get_data with specific ISIN and Exchange

Hi,
I would like to receive 'CF_BID', 'CF_ASK', 'BIDSIZE', 'ASKSIZE' of a specific ISIN and exchange.
This is working well for an ISIN as identifier:

# retrieve RIC from ISIN
DATA, err = ek.get_data(['US02079K3059'], ['TR.RIC'])
# convert RICs to list to be used
ric_lists = DATA['RIC'].to_list()
# get data
df, err = ek.get_data(ric_lists, ['CF_NAME','CF_BID', 'CF_ASK', 'BIDSIZE', 'ASKSIZE', 'CF_EXCHNG'])
display(df)

The result is based on GOOGL.OQ.


How can I change the exchange? I would like to receive data for the german Exchange Tradegate. The RIC is ABEA.TG.

Any ideas?

eikoneikon-data-apipythonpython api
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
4.7k 13 2 7

Dear @Bjorn8 ,


I would suggest two approaches to achieve the desired outcome:

1. using get_symbology function by specifying parameter value of best_match to FALSE which will return all RICs.

rics = ek.get_symbology('US02079K3059', from_symbol_type="ISIN", to_symbol_type="RIC", best_match = False)
rics['RICs'].to_list()

The drawback of this approach is that it returns list of all RICs without specifying the exchanges. So you would need to hand select the RIC you want from the list of all RICs.

screen-shot-2022-07-08-at-192457.png

2. Using search function from RD Library:

response = search.Definition(
        query = 'US02079K3059',
        select = ' RIC, ExchangeCode',
        top = 100
    ).get_data().data.df

ric = response.loc[res['ExchangeCode'] == 'TDG']
ric

This will allow to get a dataframe with a RIC from the exchange you specify in your query.

screen-shot-2022-07-08-at-192443.png

From here you can use get_data function from Eikon or RD to request date for 'CF_BID', 'CF_ASK', 'BIDSIZE', 'ASKSIZE' fields. Posting here an example of get_data function from RD:

rd.get_data('ABEA.TG', fields = ['CF_BID', 'CF_ASK', 'BIDSIZE', 'ASKSIZE' ])

You will find the GitHub repo for RD library QuickStart and Examples useful to connect and use the API.


I hope this was helpful. Feel free to let me know if you have any further questions.


Best regards,

Haykaz


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.

Upvote
25.3k 87 12 25

Hi @Bjorn8

You should be able to achieve what you want using the RDP Symbology API - e.g.

{
  "from": [
    {
      "values": [
        {
          "RDNExchangeCode": "TDG",
          "Isin": "US02079K3059"
        },
        {
          "RDNExchangeCode": "NSQ",
          "Isin": "US02079K3059"
        }
      ]
    }
  ],
  "to": [
    {
      "identifierTypes": [
        "RIC"
      ],
      "objectTypes": [
        "EdfQuote"
      ]
    }
  ],
  "type": "predefined",
  "route": "IsinVenueToQuote"
}

gives:

 [{'input': [{'value': 'US02079K3059', 'identifierType': 'Isin'},
    {'value': 'NSQ', 'identifierType': 'RDNExchangeCode'}],
   'output': [{'value': 'GOOGL.O', 'identifierType': 'RIC'}]},
  {'input': [{'value': 'US02079K3059', 'identifierType': 'Isin'},
    {'value': 'TDG', 'identifierType': 'RDNExchangeCode'}],
   'output': [{'value': 'ABEA.TG', 'identifierType': 'RIC'}]}]

This would require using the Endpoint interface of the RD Library (as the symbol_conversion uses a different API at the moment)

You can see an example of the Symbology API being used with the Endpoint interface at Example.DataLibrary.Python/EX-3.01.01-Endpoint.ipynb - if you refer to the Body Parameter: example towards bottom of that notebook.

As you will note, you can provide multiple input values in a single request.

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.