Hi Team,
Please can someone check the below and provide resolution.
*** EXTERNAL EMAIL ***
Very good Denis – we’re definitely one step closer now. I’ve changed the password and…
import lseg.data as ld
APP_KEY = "ee1aca4f4d86445bb6d980c533b95686d86716b4"
RDP_LOGIN = "cip@vitol.com"
RDP_PASSWORD = "..."
session = ld.session.platform.Definition(
app_key = APP_KEY,
grant = ld.session.platform.GrantPassword(
username = RDP_LOGIN,
password = RDP_PASSWORD,
),
signon_control=True,
).get_session()
session.open()
ld.open_session()
df = ld.get_history(
universe="GOOG.O",
fields=["BID", "ASK", "TR.Revenue"],
interval="1Y",
start="2015-01-01",
end="2019-10-01",
)
I had to add signon_control=True as I was getting a Session quota error otherwise.
The session now has has an “opened” state and I see no errors anymore:
However, the data frame that ld.get_history returns is empty. I’ve taken the example snippet from pypi. I’m not sure which datasets I’m permissioned to query – perhaps there is something universal like FX that we could try to test?
CORPORATE
Hi Cornelius,
Glad your session is now connected. Could you try EUR= or GBP= for FX. For Energy you can try the front month ice brent contract LCOc1. Let me know if you’re able to pull history.
Thanks,Denis
*** EXTERNAL EMAIL ***
Hm, no luck unfortunately. This is what I’ve done:
df = ld.get_history(
universe="EUR=",
fields=["BID"],
interval="1Y",
start="2015-01-01",
end="2019-10-01",
)
And the error message I receive back is
in get_history(universe, fields, interval, start, end, adjustments, count, parameters, header_type)
210 if exceptions and all(exceptions):
211 except_msg = "\n\n".join(exceptions)
--> 212 raise LDError(message=except_msg)
214 if not any({adc_data, hp_data, cust_inst_data}):
215 return DataFrame()
LDError: No data to return, please check errors: ERROR: No successful response.
(404, Not found)