Hi Team, Can you please advise how to retrieve historical chain constituents specifically for Delivery Baskets (i.e. DLV).
from lseg.data.discovery import Chain
fchi = Chain(name="0#TYc1=DLV")
print(fchi.constituents)
Hello @paul_c
Please advise the client to check the EX-1.01.07-Chains.ipynb chain example. It contains how to combine the Data Library Chain module with get_data and get_history methods.
Chain
get_data
get_history
Hello @wasin.w V3
import lseg.data as ld from lseg.data.discovery import Chain ld.open_session() fchi = Chain(name="0#TYc1=DLV") df1 = ld.get_history(fchi, ['BID'], start = "2026-05-01") df0 = ld.get_history(fchi, ['BID']) print(f"df1:\n{df1}") print(f"df0:\n{df0}") On this script, we're expecting a different set of "constituents" for this.
But it just takes the current constituent list for the chain and apply the get_history for those rics.
Hi I do not understand. Do you mean you are expecting a different result of Chain RIC 0#TYc1=DLV constituent RICs?
I have checked the code.
fchi = Chain(name="0#TYc1=DLV") print(fchi.constituents)
The result is list of '91282CQT1=', '91282CQN4=', '91282CQF1=', '91282CHC8=', '91282CHT1=', '91282CJJ1=', '91282CJZ5=', '91282CKQ3=', '91282CLF6=' RICs.
Then I check the 0#TYc1=DLV Quote app on the Workspace and check the RIC constituent RICs (which available in the LONGLINK1 to LONGLINK14 fields).
The 0#TYc1=DLV LONGLINKx fields contain the same RICs as the data library Chain.constituent property.
Chain.constituent
Those RICs ('91282CQT1=', '91282CQN4=', '91282CQF1=',..) are also not the Chain RIC as they do not contain the LONGLINKx fields.
yes, I am expecting a different basket of ISIN each time there's a change of underlying. This chain RIC is a continuation RIC. The root is 0#TY and c1 is the front-end Month. Right now, it is for September 2026 (TYU26). But few weeks back it was referring June (TYM26). Hence, I am hoping to be able to extract its constituents at a specific time in the past.
Thank you for clarification. Unfortunately, the Data Library Chain() object always gets the chain constituent from the Real-Time platform, so you always get "the current" constituent RICs.
Chain()
There is a workaround. You can use the https://developers.lseg.com/en/api-catalog/refinitiv-tick-history/refinitiv-tick-history-rth-rest-api (aks DataScope REST API, DSS) to get the historical chain constituent. Please check the REST API Tutorial 15: Historical Chain Constituents Search page for more detail.
Example:
Code Suggestion
I recommend using the Data Library Historical Pricing (Content Layer) get_data_async method to retrieve historical data for multiple RICs by making separate requests for each RIC.
get_data_async
Please see EX-2.01.02-HistoricalPricing-ParallelRequests.ipynb example for more detail. Each RIC request gets its own Dataframe result which is easier to manage the requesting a list of RICs.