In trying to get RD working, I ran through the examples posted on https://pypi.org/project/refinitiv-data/, within a platform session (desktop session not an option for my purposes). This example was taking 9 *minutes* to return a response, and only returned the revenue number:
df = rd.get_data( universe=['IBM.N', 'VOD.L'], fields=['BID', 'ASK', 'TR.Revenue'] ) print(df)
This example, on the other hand, came back in ~9 seconds:
response = fundamental_and_reference.Definition( ['IBM.N', 'VOD.L'], ['TR.BidPrice', 'TR.AskPrice', 'TR.Revenue'] ).get_data() print(response.data.df)
After messing about with this a while longer, I discovered that (apparently) the issue is in the rd.get_data function's ability to handle bad fields names. In the first example, 'BID' and 'ASK' are not acceptable field names and get dropped from the internal request, and if you change them to TR.BidPrice and TR.AskPrice, rd.get_data returns a response in ~9 seconds (and actually gives you data). If I change the fields list to ['ARTICHOKE','TR.Revenue'], ARTICHOKE gets dropped from the internal request, but I'm back to ~9 minutes waiting for the response.
My reason for posting:
- Can anyone on the RD/RPD team replicate this response delay when BID and/or ASK fields are part of the request?
- If so, maybe change the example on the https://pypi.org/project/refinitiv-data/ page?
- Modify rd.get_data to TELL you when you're requesting a field it cannot provide? The only error I'm seeing in the logging is the ConnectTimeout('timed out') at close to the five-minute mark.
- Document that, if response is abnormally/absurdly slow, the presence of a bad field could be the issue.