Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by igorg · Mar 15, 2019 at 05:42 PM · python api

Different results for the same query

3 requests:

1. ek.get_data('0#IPC:', ['RECORDTYPE'], '')

2019-03-15 16:45:14,189 -- pyeikon -- DEBUG -- Request:{'Entity': {'E': 'DataGrid', 'W': {'instruments': ['0#IPC:'], 'fields': [{'name': 'RECORDTYPE'}]}}, 'ID': '123'} 
2019-03-15 16:45:15,220 -- pyeikon -- DEBUG -- HTTP Response code: 200 
2019-03-15 16:45:15,220 -- pyeikon -- DEBUG -- HTTP Response: {"columnHeadersCount":1,"data":[["/IPCM9",114],["/IPCU9",114],["/IPCZ9",114],["/IPCH0",null]],"error":[{"code":251658243,"col":1,"message":"'The record could not be found' for the instrument '/IPCH0'","row":3}],"headerOrientation":"horizontal","headers":[[{"displayName":"Instrument"},{"displayName":"RECORDTYPE","field":"RECORDTYPE"}]],"rowHeadersCount":1,"totalColumnsCount":2,"totalRowsCount":5} 

The program skipped /IPCH0 as invalid ticker

2. ek.get_data('0#IPC:', ['RECORDTYPE'], '')

2019-03-15 17:07:16,584 -- pyeikon -- DEBUG -- Request:{'Entity': {'E': 'DataGrid', 'W': {'instruments': ['0#IPC:'], 'fields': [{'name': 'RECORDTYPE'}]}}} 
2019-03-15 17:07:17,713 -- pyeikon -- DEBUG -- HTTP Response code: 200 
2019-03-15 17:07:17,713 -- pyeikon -- DEBUG -- HTTP Response: {"columnHeadersCount":1,"data":[["/IPCM9",114],["/IPCU9",114],["/IPCZ9",114],["/IPCH0",114]],"headerOrientation":"horizontal","headers":[[{"displayName":"Instrument"},{"displayName":"RECORDTYPE","field":"RECORDTYPE"}]],"rowHeadersCount":1,"totalColumnsCount":2,"totalRowsCount":5} 

The program assumed that /IPCH0 is valid ticker.

Next request :

ek.get_timeseries('/IPCH0', ['VOLUME;VALUE','TIMESTAMP'], '2019-03-15T00:00:00', '2019-03-15T00:00:01', 'daily')

2019-03-15 17:08:17,103 -- pyeikon -- DEBUG -- Request:{'Entity': {'E': 'TimeSeries', 'W': {'rics': ['IPCH0'], 'fields': ['VOLUME;OPEN;CLOSE;HIGH;LOW;', 'TIMESTAMP'], 'interval': 'daily', 'startdate': '2019-03-15T00:00:00', 'enddate': '2019-03-15T00:00:01'}}} 
2019-03-15 17:08:17,731 -- pyeikon -- DEBUG -- HTTP Response code: 200 
2019-03-15 17:08:17,731 -- pyeikon -- DEBUG -- HTTP Response: {"timeseriesData":[{"dataPoints":null,"errorCode":"TSIError","errorMessage":"Error: TSINotPermissioned, ErrorCode: TA-TSINotPermissioned, Fault: TSIError, Description: The user does not have permission for the requested data","ric":"IPCH0","statusCode":"Error"}]} 
2019-03-15 17:08:17,731 -- pyeikon -- WARNING -- Error with IPCH0: The user does not have permission for the requested data 
2019-03-15 17:08:17,731 -- pyeikon -- ERROR -- IPCH0: The user does not have permission for the requested data |

The program stopped as not-expected error come.

3. The same steps as in #2, but in the second request we get expected result:

>>> ek.get_timeseries('/IPCH0', ['VOLUME;VALUE','TIMESTAMP'], '2019-03-15T00:00:00', '2019-03-15T00:00:01', 'daily')
Error with /IPCH0: No data available for the requested date range
/IPCH0: No data available for the requested date range |
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\Python37-32\Lib\site-packages\eikon\time_series.py", line 193, in get_timeseries
    raise EikonError(-1, message=ts_error_messages)
eikon.eikonError.EikonError: Error code -1 | /IPCH0: No data available for the requested date range |

As you can see, 3 different results for the same ticker within 30-35 minutes. We handle 1st and 3rd scenarios. But "The user does not have permissions.." for the ticker that we just collected from Chain request looks strange.

Any possible explanation of this behavior ?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov. · Mar 15, 2019 at 06:54 PM

I think it is related to the rollover that happens today for this future. IPCH9 expires today. It must have been removed from the chain after market close, and a new contract IPCH0 was added. This operation does not happen at the exact same moment on all backend systems, which is why you see this rather confusing behavior. It seems that the first time you requested data the real-time chain 0#IPC: already had RIC IPCH9 removed and IPCH0 added. But the delayed RIC /IPCH0 may not have been created yet, which is why you got null as the value of the RECORDTYPE field. Similarly when you requested timeseries for IPCH0 you got not permissioned error because you're not entitled to real-time data for this future and the delayed RIC was probably not yet created on the timeseries database.
You may want to adjust the time when you run the requests to accommodate for the rollover process. It may also be helpful to request delayed data explicitly rather than letting the system to fall back on it.
By the way with your current process you're missing the quotes for IPCH9, which was still trading today.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
igorg · Mar 17, 2019 at 08:27 PM 0
Share

It makes sense.

And thank you for the hint about missing data in our process.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
7 People are following this question.

Related Questions

Get Instruments by exchange or country?

Find or calculate intraday volatility.

How can I access the Eikon Data API using Python on macOS?

Request Average Price over a period of time.

TR.OPENPRICE, TR.HIGHPRICE, TR.LOWPRICE, TR.SETTLEMENTPRICE returning NaN for ESU0

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges