Find more posts tagged with
Sort by:
1 - 1 of
11
Sort by:
1 - 1 of
11
Thank you for reaching out to us.
You can use the Refinitv Data Library for Python to retrieve top news of Commodities/Energy. The code looks like this.
top_news = news.top_news.hierarchy.Definition().get_data();
df = top_news.data.df.reset_index()
newsId = df[df["Subcategory"]=="Energy"]["topNewsId"].to_list()[0]
front_page = news.top_news.Definition(newsId).get_data()
front_page.data.df
You can refer to the news example on GitHub.
For the market snapshot, it should be the get_history method with rebasing the historical data.
df = rd.get_history(
universe=['LCOc1'],
fields=["SETTLE"],
count=130
)
df["rebase"] = (100/df.iloc[0]["SETTLE"])*(df["SETTLE"]-df.iloc[0]["SETTLE"])
df
However, I can't find the endpoints for trending topics, and last news. Please contact the RDP support team directly for the endpoints or the news query for the latest news.
@marceugene.belen
Thank you for reaching out to us.
You can use the Refinitv Data Library for Python to retrieve top news of Commodities/Energy. The code looks like this.
You can refer to the news example on GitHub.
For the market snapshot, it should be the get_history method with rebasing the historical data.
However, I can't find the endpoints for trending topics, and last news. Please contact the RDP support team directly for the endpoints or the news query for the latest news.