-
I’m trying to do is to open a connection, without using a config file, is that possible?
I’m trying to stream prices using the lseg api. I was using a config file to set up the session: with open(self.config_file_name, "w") as config_file: config_file.write(json.dumps(self.config_dict, indent=4)) self._session = rd.open_session(config_name=self.config_file_name) This works well, but when I deploy to AWS the…
-
Cannot prepare connection OMMStreamConnection when running in Pycharm IDE vs Codebook
I run the following code in codebook and it’s fine: import refinitiv.data as rd from refinitiv.data.content import pricing contract = 'CL' rd.open_session() ice_oil = ['LCO', 'LGO'] chain = pricing.chain.Definition(name=f"0#/{contract}:").get_stream() chain.open(with_updates=False) chain.close() if contract in ice_oil:…
-
Why does my code not return any values? It works for other fields, for example TR.Price.Close
import pandas as pd import numpy as np import plotly.graph_objects as go import lseg.data as ld from plotly.offline import plot import cufflinks as cf # Cufflinks import configparser as cp import time all_data = [] for i in range(0, len(RICS), batch_size): batch = RICS[i:i + batch_size] data = ld.get_history(…
-
Cannot open session
hello, I keep having a handshake error, would you know why? Error on handshake url : DesktopSessionError() http://localhost:9005/api/handshake I tried clearing the caches, updating refinitiv, re-installing the packages, and it should not be a proxy problem either. Help!
-
Eikon Data API Usage Limits
Hi Team, I am new to the API and currently using the Eikon Data API to fetch news data through a Python script that runs every minute. However, at some point, the program crashed. To identify the issue, I ran the sample code from the codebook, but it returned an empty dataframe: I have a few questions regarding this: Did I…
-
How to set the Period year = [2025,2026] to be dynamic in CODEBK?
how do i make a function like this to work? import refinitiv.data as rd rd.open_session() year = [2025,2026] df = rd.get_data( universe = ['CEAB3.SA'], fields = ['TR.NetProfitMean(Period=year1})', 'TR.NetProfitMean(Period=year2})'], parameters = { 'year1':year[0], 'year2':year[1] } ) display(df) the year list is dynamic.…
-
Eikon API script doesnt work with Workspace.
Hi, can you please help on below - this is my script to grab a rolling basis of 5 days VWAP data for an underlying daily into a dataframe but it doesnt seem to work anymore. I changed it from Eikon to lseg.data import pandas as pd import win32com.client import subprocess import json import requests import re import eikon…
-
CPI Forecasting with ARIMA
How can i do ARIMA Forecast for economic variables like Swiss CPI, code below does not work, whick Field ID works? spot_df = rd.get_history( "CHCPIY=ECI", 'CTBTR_1', interval='monthly', start="2024-01-01", count=10000) print(spot_df) _e_date = datetime.fromtimestamp(datetime.timestamp(spot_df.index[-1])) e_date = _e_date +…
-
Issue with field PDOR_1 with LSEG Data API
I am attempting to get the previous date of release of an economic indicator EUECBR=ECI. On Workspace Quote page that field id PDOR_1. I am able to get the data for this field with Workspace Excel as well, however in Python API it gives me NA. Can someone assist me with this please? I have attached relevant screenshots…
-
Bond.Pricing Cross Currency
Hi All, Is it possible to get cross currency spreads for example to ZSpreadBp in Euro terms, either via fields or pricing parameters? And secondly, is it possible to retrieve and issuer curve as universe instead of adding bonds manually to the universe via bond.Definition. ? Best,