To return to my previous problem, I realized that only part of the query worked. I can successfully extract the "GICS Sector" and the "GICS Industry Sector" from an ISIN using the fields "TR.GICSSector" and "TR.GICSIndustryGroup". However, I can’t extract the "Instrument Type" using the field you provided me: "TR.ShareType".
Here is my code (for one ISIN to simplify):
import lseg.data as ld
ld.open_session()
isin = ["IE00B4BNMY34"]
try:
result = ld.get_data(
universe=isin,
fields=["TR.ShareType"]
)
print("\n=== Résultat brut de ld.get_data ===")
print(result)
except Exception as e:
print(f"\nErreur pendant la requête LSEG : {e}")
ld.close_session()
I get this error (which I have already encountered many times when trying to extract the type of instrument):
Erreur pendant la requête LSEG : Unable to resolve all requested fields in ['TR.SHARETYPE']. The formula must contain at least one field or function.
Do you have any idea to help me extract the type of instrument from an ISIN in Python? Is there a place where I can find documentation regarding field names (like "TR.ShareType" for example)?