Posting this on behalf of Workspace user from case 15982026.
Could you please advise how we should update the code to make it more efficient and compliant with the LSEG Data Library limits? In particular, we would appreciate your guidance on the following:
- How to restructure the code so that multiple RICs are passed in a single
universe list rather than calling ld.get_history() separately for each RIC. - What batch size would be appropriate, given the 3,000 data point limit for interday requests?
- Whether the code should split requests by month, by RIC group, or by both month and RIC group.
- Whether there is a recommended way to identify valid expired SWMP option RICs before retrieving historical prices, so that the script does not test a large number of invalid RICs.
- Which field should be used for daily settle prices for these instruments:
SETTLE, STL, or TRDPRC_1? - Whether there is a better API method or endpoint for this type of historical expired options data extraction.
Hai Hon successfully downloaded one month of daily data, so the basic logic appears to work. However, when scaling the request to the full period from November 2021 to April 2026, the current approach appears to trigger limit issues. We would appreciate your advice on how best to modify the code for a larger historical extraction.
I have pasted the full code below.