-
get_history stopped working in API (Visual code studio)
Hi, since few weeks ( not sure but I think after upgrading some python libraries like pandas etc.) I have problems with getting data using refinitive API in Visual code studio. for example I get empty df with this simple code: import pandas as pd import refinitiv.data as rd rd.open_session()…
-
API Pagination in Python Using Refinitiv Data API
Hello, I'm working on a Python project using the Refinitiv Data API to retrieve large sets of equity quote data. I need to fetch data in chunks of 10,000 records due to API limitations, but I'm struggling with implementing effective pagination to avoid overlapping data without missing any records. The API doesn't seem to…
-
Refinitiv.data proper fields names
Greetings, I am currently involved in a project aimed at retrieving the closing price for companies that have been delisted due to bankruptcy, specifically the day following their bankruptcy announcement. The primary methodology I employ involves checking whether 'TR.MnAHasBankruptcy' is true. If this condition is met, we…
-
Extracting analyst estimates data using Not Null filter for period end date
Hi, I am trying to extract the analyst estimates data as mentioned in the code below - df, err = ek.get_data( instruments = ric_lst, fields = ['TR.EPSMean.periodenddate', 'TR.EPSMean', 'TR.EPSMean.date','TR.RevenueMean', 'TR.NetProfitMean'], parameters={'SDate':'2010-01-01','EDate':'2023-12-13','Period':'FQ1'}) The issue I…
-
Wieso funktioniert die .at() Funktion bei Pandas nicht?
I have the following code in which I access a CSV file with multiple columns containing numbers and want to change a specific column under certain conditions: import csv import pandas final_activities = pandas.read_csv("VPN2/VPN2_Final_Activities.csv", delimiter=';', names=['Timerels', 'ActivityClass_Ankle',…
-
A 'get_news_story' request into a dataframe
Hi, I am using ek.get_news_headlines to display a dataframe of 5 news articles for a particular company. i.e. df = ek.get_news_headlines('GOOG.O AND Language:LEN', date_from='2021-01-01T09:00:00', date_to='2023-06-30T23:59:59', count = 5) The above works fine at display the last 5 storyId's... but i'd like to use the…
-
Unpin pandas dependency in refinitiv-data?
Currently refinitiv-data https://pypi.org/project/refinitiv-data/ has a pinned pandas dependency at 1.3.5, which is a few versions old. Would it be possible to unpin that? It's forcing users to downgrade their pandas versions to use the library. Thank you!
-
Filtering Python Dataframe by Minutes
Hi Developer Community! I have filtered my minute time series data frame by specific hours and minutes. The first Loop filters for 11:30 the second for 9:30. Lastly, I concatenated them next to each other. Is there a way to do the same procedure without using an extra (second) loop? I would like to add more time and hour…
-
Future Depreciation pandas : FutureWarning when using get_timeseries with normalize=True
Hi team, When using the method get_timeseries with normalize=True, a waning is raised with the following message : FutureWarning: Could not cast to float64, falling back to object. This behavior is deprecated. In a future version, when a dtype is passed to 'DataFrame', either all columns will be cast to that dtype, or a…
-
Pause/resume and decreasing the frequency of updates coming from an ADS.
Hi, I have an ommConsumer that registers its interests and receives updates from the server. Sometimes the rate of updates is too high and I would like to either pause/resume or decrease the update rate. Is it possible at all? I am using Java and would be useful to see an example/code-snippet in case it would really be…
-
Requesting large data amounts in batches via RDP API
I am trying to download roughly 10 years of daily price data for 3000 firms with rdp.get_get_historical_price When trying it at once, the API times out. What are best practices for requesting data in batches and the combining the outputs to a single pandas dataframe? Currently I am trying to do it in batches by appending…
-
Why do I get Pandas ValueError: invalid literal for int() with base 10: 'undefined' when I try to lo
Pandas Version: 1.1.5
-
Python Pandas -remove rows based on given value in cell?
I have following script which removes rows in which date start with 202110 in column DATE OF OPERATION. I understand that space in the name of column is not allowed so script also replace space by _ and then after rows are removed it add back the space. For some reason I couldn't attach csv here so please see example…
-
How to change pandas data type?
How to change pandas data type? Is there a pandas function to type convert form 'pandas.core.series.Series' to 'pandas.core.frame.Pandas' ? Data example: numpy_data = np.array([[1, 2], [3, 4], [1, 1]]) df = pd.DataFrame(data=numpy_data, index=[1,2,3], columns=["column1", "column2"]) Here I get the pandas.core.frame.Pandas…
-
Returned data is in a shortened format
When I call the Eikon Data API using Python, the listed data is presented in a shortened manner, with many lines replaced by "...". The below is what I get when using IDLE for Python, but the same behaviour occurs with calls from the Windows command line. Is there a setting that I can change to ensure I get the full…
-
Trying to retrieve Expired S&P500 Index option chain
Hello. I am trying to retrieve the RICs of expired options. In the case of non-expired options, I can get the RICs of options as follows: df, e = ek.get_data(['0#SPX*.U'], ['PUTCALLIND', 'STRIKE_PRC', 'EXPIR_DATE', 'CF_CLOSE', 'IMP_VOL'] ) However, to get the expired RICs of options, I guess the following should work, but…
-
Manage Data With Pandas Dataframe
Hello, would be possible for you to create an example in python that populates a Pandas dataframe with the following data (4 columns, same order below) for a custom list of tickers (let's say for example 10 tickers of your choice), in a given time frame (i.e last 2 years) using DS data: ticker, date in yyyymmdd format,…
-
How to write the number of lines of an output in it's first line?
I am trying to add a line with the number of lines in the outputs I am generating with a loop for. import os.path import meshio import pandas as pd import numpy as np import csv cnt = 0 for file in os.listdir(): if file.endswith(".vtu"): mesh = meshio.read(file) Sn = mesh.point_data['Sn'] coordinates = mesh.points data =…
-
Regarding the pandas.np future warning: when will the pandas np module be removed?
Dear support, while running the api I receive the future warning regarding pandas.np deprecated and will be removed in future. I allready import numpy package directly but it looks like the built menu might use the old function. Is it possible to share code so that you can pinpoint where the error is / advise on solution?…
-
Eikon API - AttributeError: 'DataFrame' object has no attribute 'convert_dtypes' - on simple ek.get_
I have successfully installed Refinitiv Workspace, and have successfully gotten the excel add in to work. All good. Having a problem with the python API. Can you give this to your python guys? Basically, here is the call I am doing, which is returning an error: df, e = ek.get_data('AAPL.OQ', ['TR.Employees.fperiod',…
-
parse RKD fundamental api data from json to pandas dataframe
Hello Team, I am facing problem in parsing RKD fundamental api data from json to pandas dataframe. Code: appid = "" token = "" # input_1 : appid and token # RKD api request message headers message_headers = { 'content-type': 'application/json;charset=utf-8' , 'X-Trkd-Auth-ApplicationID': appid, 'X-Trkd-Auth-Token' : token…
-
Eikon "json_requests" incorrect and Eikon Data API has lost access - related to recent update?
I have a pretty simple python script to get Refinitiv Eikon Data into a dataframe. import eikon as ek ek.set_app_key('api_key_goes_here') #real key would go here Instruments = ["USFN3015=TWEB","USFN30151=TWEB","USFN30152=TWEB"] Fields = [ek.TR_Field('CF_NAME'), ek.TR_Field('COUPN_RATE'), ek.TR_Field('CF_LAST')] Price_df,…
-
Streaming Data From Eikon Excel To Python
Hello, I am trying to read price data from Eikon Excel to Python Pandas DataFrame during real time updates. The issue is that Eikon Excel does not save streaming data in real time, while Python can only read saved excel files. I tried to use an Excel macro to automatically save the file during real time updates, but…
-
How to handle the multiple columns in pandas with symbols
Hi! when I request timeseries data for a list of RICS instead of 1, the DF returned has an extra layer on top of the usual OHLC-V data with the symbol names. So the DF is horizontally built. I cant seem to transform this to something I can easily work with. Could anyone tell me how to get this: into this: thanks!
-
FutureWarning for data_grid.py (pandas.np module is deprecated and will be removed... import numpy d
Hi, I see a warning when using Eikon's Python API package (eikon). The commands I ran were: * import eikon as ek * ek.set_app_key('....') * df2, err = ek.get_data(['RIC_1', 'RIC_2' ...], ['TRD_STATUS']) The warning message I see is: C:\Users\kengwong\KOminiconda3\envs\brk\lib\site-packages\eikon\data_grid.py:247:…
-
For 2 stocks listed on same exchange I get different number of rows of historical data and missing m
Hi folks, I have downloaded the minute data from AMZN.0 and TSLA.O starting from January 1st to March 18th both 2020. Dates were selected in that period to avoid the 50k limit. I expected to get the same number of rows, instead I get 48.868 from one and 43.537 from the other. So there are two possibilities: 1.- Data is…
-
Pandas.np depreciation warning
Hi. I am getting the following warning and wanted to bring it your attention. Will this be fixed in future iterations of the API? /Library/Python/3.7/site-packages/eikon/time_series.py:209: FutureWarning:= The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead
-
reshape dataframe with pd.pivot_table - missing data
Hi, I've used the following line to retrieve time series monthly total returns together with the respective dates. unitr, e = ek.get_data(unilist,['TR.TotalReturn.date','TR.TotalReturn'],parameters={'SDate':'2018-02-01','EDate':'2019-04-30','Frq':'M','CH':'Fd'}) (Where unilist is the list of FTSE 350 constituents). I'm…
-
How can I import a shareholder history report through the eikon python API?
I would like to import a shareholder history report for a company as a pandas dataframe, i.e. at least the absolute amount of capital invested and the changes therein. Preferably though I would like to get the complete shareholder history report in the same structure as you can simply download it in excel. I have not been…
-
Launch excel COM Add-in with python win32com
I want to use python to automate an excel+eikon workflow. I tried to rebuild all of my excel API calls with eikon's python package, but not all required data was supported. My excel file is .xlsm, and it needs to connect to eikon then update before I manipulate data in python. I'm using win32com as follows: import…
-
Python: Eikon is generating unrequested dates for some ID's, using get_data.
I have the following code that requests local returns for a list of companies. import pandas as pd import eikon as ek #import Eikon module import datetime import time start_time=time.time() ek.set_app_id('someId') #setting AppID #Getting a list of dates start=datetime.date(2017,11,27) end=datetime.date.today() -…
-
How to rename the column header in the data frame?
Hi, in using eikon.get_data() to extract SmartEstimate data into python dataframes, I get "Earnings Per Share - SmartEstimate®" but cannot rename the header given the "®". How do I rename the column header in this case?