There are many similar cases. When the SDate and EDate are before 2020, it often occurs that only Close has a price while the others do not.
@rice
Thank you for reaching out to us.
I tested it on the Workspace Excel with the following formula.
=RDP.Data(".SP100","TR.OPENPRICE;TR.HIGHPRICE;TR.LOWPRICE;TR.CLOSEPRICE;TR.ACCUMULATEDVOLUME","SDate=2018-12-01 EDate=2018-12-31 CH=Fd RH=IN,Date",B2)
It also returns NULL.
This could be a content related question. Please contact the helpdesk team directly via LSEG Support to verify the data.
o
I've encountered this situation many times: when I select sdate and edate, sometimes only the Open data from the previous month is not empty, and sometimes the returned Open data is all empty. But I confirmed with support that this symbol has had data since May 2005.
Can the support team share the Workspace Excel Formula that can provide those data?
If the data is available in the Workspace Excel, it is likely that the same data can be retrieved through the API.
I've encountered this situation many times: when I select sdate and edate, sometimes only the Open data for the previous month is not empty, and sometimes the returned Open data is all empty. But I confirmed with support that this symbol has had data since May 2005.
I don't understand why this problem occurs. When I change the sdate in Figure 1 to 2012-10-15, the Open data returned for 10.15–11.21 is normal, but everything else is empty. Is this an issue with the API?
The library simply constructs a request message and sends it to the endpoint. The endpoint then retrieves the data from the underlying data source and returns it to the library. Finally, the library converts the response into a DataFrame and passes it back to the application.
Since the issue can also be reproduced in Workspace Excel, it is likely a content-related issue. I do not have access to the data source to verify the returned data. Therefore, please contact the helpdesk team to verify the data.
According to this picture, the data is misaligned.
Please confirm whether you are using the desktop.workspace session or the platform.ldp session. The issue may relate to this discussion.
If I uses the platform.ldp session, the data is NA.
However, if I uses the desktop.workspace session, the data looks like this:
The code is:
df = ld.get_data( universe = ['.SPDAUDT'], fields = ['TR.CLOSEPRICE.Date','TR.OpenPrice','TR.HighPrice','TR.LowPrice', 'TR.ClosePrice(Adjusted=1)','TR.ACCUMULATEDVOLUME'], parameters = {'SDate':'2012-09-15','EDate':'2014-12-31','Frq':'D'}) df
I used
"config = ld.get_config() config.set_param("apis.data.datagrid.underlying-platform", "rdp")
ld.open_session( config_name=".//lseg_data_config.json", name="desktop.workspace")"
When I try to get the data for .SX4P, the Open for December is empty.
Please remove this line:
config.set_param("apis.data.datagrid.underlying-platform", "rdp")
Then, the output will be aligned.
I previously needed to set
to get data for .BUKSC. I'm not sure in what cases this setting is needed and in what cases it should be removed.
The underlying RDP datagrid platform can cause misaligned data.
The workaround is using the fundamental_and_reference module with the extended_params to retrieve data, as mentioned in this discussion.
from lseg.data.content import fundamental_and_reference response= fundamental_and_reference.Definition( [".SX4P"], ['TR.CLOSEPRICE','TR.OPENPRICE','TR.HIGHPRICE', 'TR.LOWPRICE'], {'SDate':'1998-02-15','EDate':'1998-12-31','Frq':'D'}, extended_params = {"output":"Col,T|Va,Row,In,Date|"} ).get_data() response.data.df
The fundamental_and_reference module is a core component in the content layer used by the ld.get_data method to retrieve data for the TR fields.
You can use this code with other RICs to retrieve data for the TR fields.
When I use
, will adding fundamental_and_reference and extended_params allow data to be returned normally? If I don't use the rdp platform, what data retrieval issues might occur, such as with .BUKSC as mentioned before?
I need to check that discussion. Can you share the link that contains this picture?
https://community.developers.lseg.com/discussion/132718/how-can-i-get-the-price-and-date-data-for-buksc?tab=all#latest
It looks like that the underlying UDF datagrid is not stable when requesting that data.
I tested it and sometimes I got the following error.
LDError: Unable to collect data for the field 'TR.CLOSEPRICE.DATE' and some specific identifier(s). Requested universes: ['.BUKSC']. Requested fields: ['TR.CLOSEPRICE.DATE', 'TR.CLOSEPRICE(ADJUSTED=1)', 'TR.OPENPRICE', 'TR.HIGHPRICE', 'TR.LOWPRICE']
Sometimes, it works.
I will submit a ticket on your behalf to the product team to verify this issue.
I found that the email you registered with is not a company email, so I’m unable to submit a ticket on your behalf.
You may need to your company email to submit this issue through LSEG Support.
I just tried and was able to retrieve .BUKSC data normally without using RDP, so I can safely remove this RDP configuration. Thank you.