Hello,
The second problem with get_history(): sometimes, for some requests the function returns nothing. Empty DataFrame. There is no way to get any details on what happened.
The behavior is not consistent. Right now I see an empty DataFrame for this request:
dataFrame = ld.get_history( universe= ["INDJ25"], fields=['ACVOL_UNS', 'OPEN_PRC', 'TRDPRC_1', 'HIGH_1', 'LOW_1'], start="2025-04-08", end="2025-04-09", interval="1D", header_type=ld.HeaderType.NAME)
The logs:
HTTP Request id 2
url = http://localhost:9000/api/rdp/data/historical-pricing/v1/views/interday-summaries/INDJ25?interval=P1D&start=2025-04-08T00%3A00%3A00.000000000Z&end=2025-04-09T00%3A00%3A00.000000000Z&fields=ACVOL_UNS%2COPEN_PRC%2CTRDPRC_1%2CHIGH_1%2CLOW_1%2CDATE
HTTP Response id 2
status_code = 200
text = [{"universe":{"ric":"INDJ25"},"interval":"P1D","summaryTimestampLabel":"endPeriod","adjustments":["exchangeCorrection","manualCorrection","CCH","CRE","RTS","RPO"],"defaultPricingField":"SETTLE","qos":{"timeliness":"delayed"},"headers":[{"name":"DATE","type":"string"},{"name":"TRDPRC_1","type":"number","decimalChar":"."},{"name":"OPEN_PRC","type":"number","decimalChar":"."},{"name":"HIGH_1","type":"number","decimalChar":"."},{"name":"LOW_1","type":"number","decimalChar":"."},{"name":"ACVOL_UNS","type":"number","decimalChar":"."}],"data":[]}]
print(dataFrame) returns:
Empty DataFrame
Columns: []
Index: []
First question is: why no data in http response?
Second: why dataFrame is empty? How can I recognize that the response was good or bad if nothing is returned?
The example of "bad" request : if I include 'VWAP' in the requested fields, the log shows
"status":{"code":"TSCC.QS.UserRequestError.90006","message":"The universe does not support the following fields: [VWAP]."}}
but the dataFrame is empty. And I don't see a way to extract this info.