Eikon API - Missing Data (vs Excel/Desktop Application)

Hi,
import pandas as pd
import eikon as ek
start_date = '2022-07-22'
end_date = '2022-07-22'
api_key = <API KEY>
id_list = ["US06654DAG25"]
ek.set_app_key(api_key)
if isinstance(id_list, str):
id_list =[id_list]
fields = ['TR.BIDPRICE', 'TR.ASKPRICE', 'TR.ASKPRICE.calcdate', 'TR.FiCurrency']
parameters = {'Frq': 'D', 'Sdate': start_date, 'Edate': end_date}
df, _ = ek.get_data(instruments = id_list, fields = fields, parameters = parameters)
Output:
However, using it from Excel:
=@TR("06654DAG2=","TR.BIDPRICE;TR.ASKPRICE","SDate=2022-07-22 CH=Fd RH=IN",B2)
Would appreciate any help as to why NA is being returned.
Thanks.
Best Answer
-
Hello @wesley.ng and all,
Conveying the resolution from the support team:
"...Have you tried restarting your computer to refresh your system?
=========
Client replied confirming it's now working. case good to close"
0
Answers
-
I can run it properly.
You may need to check the error returned from the get_data method.
df, err = ek.get_data(instruments = id_list, fields = fields, parameters = parameters)
errAre you using "import eikon as ek" or "import refinitiv.dataplatform.eikon as ek"?
0 -
Using
import eikon as ek
Have updated the original post accordingly.
Here is the error:
0 -
Please set the log_level to one and share the request and response log.
import eikon as ek
ek.set_log_level(1)For example:
2022-08-05 16:50:32,075 P[24780] [MainThread 39764] entity: DataGrid_StandardAsync
2022-08-05 16:50:32,076 P[24780] [MainThread 39764] payload: {'requests': [{'instruments': ['US06654DAG25'], 'fields': [{'name': 'TR.BIDPRICE'}, {'name': 'TR.ASKPRICE'}, {'name': 'TR.ASKPRICE.calcdate'}, {'name': 'TR.FiCurrency'}], 'parameters': {'Frq': 'D', 'Sdate': '2022-07-22', 'Edate': '2022-07-22'}}]}
2022-08-05 16:50:32,079 P[24780] [MainThread 39764] Request:{'Entity': {'E': 'DataGrid_StandardAsync', 'W': {'requests': [{'instruments': ['US06654DAG25'], 'fields': [{'name': 'TR.BIDPRICE'}, {'name': 'TR.ASKPRICE'}, {'name': 'TR.ASKPRICE.calcdate'}, {'name': 'TR.FiCurrency'}], 'parameters': {'Frq': 'D', 'Sdate': '2022-07-22', 'Edate': '2022-07-22'}}]}}}
2022-08-05 16:50:32,080 P[24780] [MainThread 39764] Request to http://127.0.0.1:9001/api/v1/data
headers = {'Content-Type': 'application/json', 'x-tr-applicationid': '...', 'Authorization': 'Bearer ...'}
params = None
2022-08-05 16:50:33,509 P[24780] [MainThread 39764] Send request with headers [(b'Host', b'127.0.0.1:9001'), (b'Accept', b'application/json'), (b'Accept-Encoding', b'gzip, deflate'), (b'Connection', b'keep-alive'), (b'User-Agent', b'python-httpx/0.21.3'), (b'Content-Type', b'application/json'), (b'x-tr-applicationid', b'...'), (b'Content-Length', b'296')] and cookies None
2022-08-05 16:50:33,510 P[24780] [MainThread 39764] HTTP request response 200: {"responses":[{"columnHeadersCount":1,"data":[["US06654DAG25",79.684,79.932,"2022-07-22","USD"]],"headerOrientation":"horizontal","headers":[[{"displayName":"Instrument"},{"displayName":"Bid Price","field":"TR.BIDPRICE"},{"displayName":"Ask Price","field":"TR.ASKPRICE"},{"displayName":"Calc Date","field":"TR.ASKPRICE.calcdate"},{"displayName":"Currency","field":"TR.FICURRENCY"}]],"rowHeadersCount":1,"totalColumnsCount":5,"totalRowsCount":2}]}
2022-08-05 16:50:33,512 P[24780] [MainThread 39764] HTTP Response code: 200
2022-08-05 16:50:33,513 P[24780] [MainThread 39764] HTTP Response: {"responses":[{"columnHeadersCount":1,"data":[["US06654DAG25",79.684,79.932,"2022-07-22","USD"]],"headerOrientation":"horizontal","headers":[[{"displayName":"Instrument"},{"displayName":"Bid Price","field":"TR.BIDPRICE"},{"displayName":"Ask Price","field":"TR.ASKPRICE"},{"displayName":"Calc Date","field":"TR.ASKPRICE.calcdate"},{"displayName":"Currency","field":"TR.FICURRENCY"}]],"rowHeadersCount":1,"totalColumnsCount":5,"totalRowsCount":2}]}
2022-08-05 16:50:33,514 P[24780] [MainThread 39764] Response size: 530You may try to use id_list = ["06654DAG2="] instead.
start_date = '2022-07-22'
end_date = '2022-07-22'
id_list = ["06654DAG2="]
if isinstance(id_list, str):
id_list =[id_list]
fields = ['TR.BIDPRICE', 'TR.ASKPRICE', 'TR.ASKPRICE.calcdate', 'TR.FiCurrency']
parameters = {'Frq': 'D', 'Sdate': start_date, 'Edate': end_date}
df, err = ek.get_data(instruments = id_list, fields = fields, parameters = parameters)
df0 -
I can't use the RIC instead of the ISIN due to the existing process I've set up - this is one ISIN out of hundreds that is failing - the rest work fine.
Log response:
2022-08-05 17:58:03,609 P[31436] [MainThread 18388] entity: DataGrid_StandardAsync
2022-08-05 17:58:03,612 P[31436] [MainThread 18388] payload: {'requests': [{'instruments': ['US06654DAG25'], 'fields': [{'name': 'TR.BIDPRICE'}, {'name': 'TR.ASKPRICE'}, {'name': 'TR.ASKPRICE.calcdate'}, {'name': 'TR.FiCurrency'}], 'parameters': {'Frq': 'D', 'Sdate': '2022-07-22', 'Edate': '2022-07-22'}}]}
2022-08-05 17:58:03,615 P[31436] [MainThread 18388] Request:{'Entity': {'E': 'DataGrid_StandardAsync', 'W': {'requests': [{'instruments': ['US06654DAG25'], 'fields': [{'name': 'TR.BIDPRICE'}, {'name': 'TR.ASKPRICE'}, {'name': 'TR.ASKPRICE.calcdate'}, {'name': 'TR.FiCurrency'}], 'parameters': {'Frq': 'D', 'Sdate': '2022-07-22', 'Edate': '2022-07-22'}}]}}}
2022-08-05 17:58:03,618 P[31436] [MainThread 18388] Request to http://127.0.0.1:9060/api/v1/data
headers = {'Content-Type': 'application/json', 'x-tr-applicationid': '...', 'Authorization': 'Bearer...'}
params = None
2022-08-05 17:58:05,646 P[31436] [MainThread 18388] HTTP request response 200: {"responses":[{"columnHeadersCount":1,"data":[["US06654DAG25",null,null,null,"USD"]],"error":[{"code":416,"col":1,"message":"Unable to collect data for the field 'TR.BIDPRICE' and some specific identifier(s).","row":0},{"code":416,"col":2,"message":"Unable to collect data for the field 'TR.ASKPRICE' and some specific identifier(s).","row":0},{"code":416,"col":3,"message":"Unable to collect data for the field 'TR.ASKPRICE.calcdate' and some specific identifier(s).","row":0}],"headerOrientation":"horizontal","headers":[[{"displayName":"Instrument"},{"displayName":"Bid Price","field":"TR.BIDPRICE"},{"displayName":"Ask Price","field":"TR.ASKPRICE"},{"displayName":"Calc Date","field":"TR.ASKPRICE.calcdate"},{"displayName":"Currency","field":"TR.FICURRENCY"}]],"rowHeadersCount":1,"totalColumnsCount":5,"totalRowsCount":2}]}
2022-08-05 17:58:05,650 P[31436] [MainThread 18388] HTTP Response code: 200
2022-08-05 17:58:05,652 P[31436] [MainThread 18388] HTTP Response: {"responses":[{"columnHeadersCount":1,"data":[["US06654DAG25",null,null,null,"USD"]],"error":[{"code":416,"col":1,"message":"Unable to collect data for the field 'TR.BIDPRICE' and some specific identifier(s).","row":0},{"code":416,"col":2,"message":"Unable to collect data for the field 'TR.ASKPRICE' and some specific identifier(s).","row":0},{"code":416,"col":3,"message":"Unable to collect data for the field 'TR.ASKPRICE.calcdate' and some specific identifier(s).","row":0}],"headerOrientation":"horizontal","headers":[[{"displayName":"Instrument"},{"displayName":"Bid Price","field":"TR.BIDPRICE"},{"displayName":"Ask Price","field":"TR.ASKPRICE"},{"displayName":"Calc Date","field":"TR.ASKPRICE.calcdate"},{"displayName":"Currency","field":"TR.FICURRENCY"}]],"rowHeadersCount":1,"totalColumnsCount":5,"totalRowsCount":2}]}
2022-08-05 17:58:05,662 P[31436] [MainThread 18388] Response size: 9370 -
The request messages are similar but the responses are different. It could be a permission issue.
I have submitted a new case on your behalf to the Eikon support team to verify what the problem is. The case number is 11481934. The Eikon support team will contact you directly to investigate the issue.
0 -
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛