Is there a way to retrieve constituents of ETFs,e.g. VAS, IOZ, directly using DSWS or any other desktop APIs (Workspace/Eikon Data API, LSEG Data Library, etc) from Codebook?
Hi @sbobkim, Thank you for reaching out! I think the below code using the LSEG Data Library for Python can be used to retrieve the constituents.
import lseg.data as ld ld.open_session() ld.get_data( universe=['VAS.AX'], fields=['TR.FundHoldingRIC(StartNum=1,EndNum=1000)'] )
The StartNum and EndNum should be included with this field else it would return the top few constituents only. Please let me know if this is helpful. Thanks : )
Worked like a charm! thank you Ujjawal!
Glad to hear that 🙂 @sbobkim Have a nice day!