question

Upvotes
Accepted
91 1 0 2

如何通过DSS C# API 获取指数的成分股信息(Index Constituents)

我想要得到某个指数的所有成分股信息,比如指数 "Austria 20" (RIC .ATX)。我需要先有这个指数的Chain RIC是吧,那如何从RIC ".ATX" 得到它的Chain RIC 呢?

当有了Chain RIC, 我应该使用 DSS C# API里面的哪些方法来获取它的成分股信息呢(最好还有股份数(number of shares)的信息)?

dss-rest-apidatascope-selectdss
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @bing.sun1,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.


Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
91 1 0 2

您好,RIC 的Chain RIC 通常是前面加0#, 比如这里.ATX就是 0#.ATX, 获取成分股的基本信息,可以发送一个/RestApi/v1/Search/HistoricalChainResolution 的reqeust, body 如下

{
  "Request": {
    "ChainRics": [
      "0#.ATX"
    ],
    "Range": {
      "Start": "2022-03-03T00:00:00.000Z",
      "End": "2022-03-03T00:00:00.000Z"
    }
  }
}

如果是.NET SDK, 代码这样

var dateRange = DateTimeRange.Create(
    new DateTimeOffset(2008, 01, 01, 0, 0, 0, TimeSpan.Zero),
    new DateTimeOffset(2016, 01, 01, 0, 0, 0, TimeSpan.Zero));
var request = new HistoricalChainResolutionRequest
{
    ChainRics = new[] { "0#HO:" },
    Range = dateRange
};
 
// Resolve constituents
var results = SearchContext.HistoricalChainResolution(request);

之后您就可以针对每一个成分股发送extraction request 去获取您想要的信息,比如您提到的股份数信息。

您可以通过链接Refinitiv DataScope Select Data Content Guide 了解更多DSS Content相关信息。对于您提到的股份数(number of shares), 我觉得可能Terms and Conditions request 可以实现,如果是这样请参考.Net SDK Tutorial 8: On Demand: Terms & Conditions 具体实现。

如果您刚刚开始使用DSS .NET SDK, 我也建议您看一下 Introductory Tutorials-> Tutorials Introduction.NET-> Connecting to the DSS Server

希望这些信息对您有帮助.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.