Hello,
Need API code to extract 'total sales', current and 12m forward, Net Margin, profits forward 12m, of SP500 and STOXX600, and Total Labor cost, ideally for the two equity indexes, if not at country level?". I started the way below but does not work. May be you can correct it pls, takes probably a few seconds for you
More generally, I would also need a list (?) where to find all codes coresponding to the variables I find on the workspace. Most importantly, There are the RIC, the fields.
Thanks
Yann
from lseg.data.content import symbol_conversion
import lseg.data as ld
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from pymongo import MongoClient
Ouvrir une session
ld.open_session()
Récupérer données daily de marché
df_daily = ld.get_history(
universe=['.SPX', '.STOXX'],
fields=['TRDPRC_1', 'TR.RevenueMean', 'TR.NetProfitMean'],
interval="daily",
start="2025-01-01",
end="2025-08-01",
)
print(df_daily)
ld.close_session(df_daily)