The 2 scripts below return the same values but use 2 different functions : get_history and get_data. What are the best practices and the pro and cons?
import refinitiv.data as rd rd.open_session() universe = ['.MIWOIN090NEU'] fields = ['TRDPRC_1'] start_date = '2000-01-01' end_date = '2024-01-02' df = rd.get_history(universe=universe,fields=fields,interval='daily',start=start_date, end=end_date,use_field_names_in_headers=True) rd.close_session()
and :
import refinitiv.data as rd rd.open_session() instruments = ['.MIWOIN090NEU'] fields = ['TR.PriceClose','TR.PriceClose.date'] start_date = '2000-01-01' end_date = '2024-01-02' df = rd.get_data(instruments, fields=fields, parameters={'SDate': start_date, 'EDate': end_date, 'DateType': 'ED', 'Adjusted': 'No'}) rd.close_session()