get_data with ISIN as identidier
I am using Eikon with python on a Windows machine. (First day using codebook)
I would like to receive for example CF_ASK and ASKSIZE for Google on the Exchange Tradegate. With "ABEA.TG" as the identifier it is working properly. But I would like to use the get_date function with an ISIN as identifier.
import eikon as ek
ek.set_app_key('my_key_here')
df, err = ek.get_data(['GOOG.O', 'ABEA.TG', 'US02079K3059', 'US02079K3059.TB'], ['CF_ASK', 'ASKSIZE'])
df
The ISINS are just showing <NA>.
How can I use an ISIN as identifiere here?
Best Answer
-
Hi @Bjorn8
It may be worth speaking to your sales contact again. It could well be that they showed you the RD Library inside Codebook - rather than the Eikon Data API?
When you run Codebook and refer to the Examples -> 01. Data Retrieval->01.01 Refinitiv Data Library folder where you can find Content Symbology example.
For example, you could do something like:
response = symbol_conversion.Definition(
symbols=["US02079K3059","LU0100938306"],
from_symbol_type=symbol_conversion.SymbolTypes.ISIN,
to_symbol_types=[
symbol_conversion.SymbolTypes.RIC
],
).get_data()
rics = response.data.df['RIC'].tolist()
df = rd.get_data(rics, ['CF_ASK', 'ASKSIZE'])Which is taking a couple of ISINs, and converting them to RICs before calling get_data()
0
Answers
-
Hi @Bjorn8,
You can print the error object to see the message returned from the server.
[{'code': 251658243,
'col': 1,
'message': "'The record could not be found' for the instrument 'US02079K3059'",
'row': 2},
{'code': 251658243,
'col': 2,
'message': "'The record could not be found' for the instrument 'US02079K3059'",
'row': 2},
{'code': 251658243,
'col': 1,
'message': "'The record could not be found' for the instrument 'US02079K3059.TB'",
'row': 3},
{'code': 251658243,
'col': 2,
'message': "'The record could not be found' for the instrument 'US02079K3059.TB'",
'row': 3}]It seems only RIC's are supported for getting the real time data fields. You can try the following query and use the non-real time fields:
df, err = ek.get_data(['GOOG.O', 'ABEA.TG', 'US02079K3059'], ['TR.ASKPRICE', 'TR.PriceClose'])
The last ISIN code seems to be invalid.
1 -
Thanks for your answer. But it has to be possible. The „sales“ team showed me that it is possible with an ISIN before I signed the contract. But now they are just referring to the QA Section here.0
-
We, the moderators on these forums can help with API, but are not content experts. I would recommend that you open a service ticket with my.refinitiv.com and directly speak with a content expert. They can advise you on this authoritatively.0
-
Hi @Bjorn8,
you can programmatically find the RICs you are after using the symbology converter in Python, then continue using the code you already have. Does that answer your question?
0 -
Thanks, that was really helpfull. Any change to set teh exchange as well? RIC is different for Google in USA and Google in Germany. May I add Exchange "TG" for Trtadegate for example?
This is what I was looking for:# retrieve RIC from ISIN
DATA, err = ek.get_data(['DE0006083405'], ['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)
0 -
Thank you this is really helpful. But is itpossible to add an exchange as well? RIC for the same ISIN is different for Tradegate and NASD for example.0
-
Hi @Bjorn8
I can do the above using the 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.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛