Infront Data Manager Connect Client (.NET)
Index Composition

To get a list of of index constituents for a index the following steps must be done:

  1. Create a Routing Data Store(Gevasys.DataCore.StaticData.Http.RoutingDataStore Class).
  2. Create a instance of the required request message.
  3. Optional: Implement the interface IAsyncRouteCallback ( Gevasys.DataCore.StaticData.IAsyncRouteCallback Interface) for the calling class.
  4. Execute the request.

Get the Index Composition for DAX Index

using System;
using Gevasys.DataCore.RequestData.ProtoBuf.V2;
using log4net;
namespace Examples
{
class IndexComposition
{
private static ILog log = LogManager.GetLogger("IndexComposition");
private MessageSerializer serializer;
private RoutingDataStore rds;
public void Main()
{
ConfigurationHelper.Initialize();
serializer = new MessageSerializer();
rds = ConfigurationHelper.RoutingDataStore;
/* Get the index composition for DAX. Availability of function depends on contract and comes with additional costs. */
IndexCompositionRequestMessage requestMessage = new IndexCompositionRequestMessage
{
header = new RequestHeaderMessage
{
user = Authentication.GetUser(),
password = Authentication.GetPassword(),
sourceTarget = SourceTargetType.SOURCE_TARGET_DMC
},
addQuotes = false,
// Get Index composition by isin
isin = "DE0008469008",
// Get Index composition by vwd code
//vwdCode = "846900.ETR"
};
StaticDataResponse response = rds.CallFunction(StaticDataFunctions.INDEX_COMPOSITION
, InputFormat.PROTO.ToString()
, OutputFormat.PROTO.ToString()
, serializer.Serialize<IndexCompositionRequestMessage>(OutputFormat.PROTO, requestMessage));
if (response.GetErrorCode() != 0)
{
log.Warn("Error from calling function: IndexComposition: " + response.GetErrorMessage());
return;
}
IndexCompositionMessage responseMessage = serializer.Deserialize<IndexCompositionMessage>(InputFormat.PROTO, response.GetData());
if (responseMessage.header.error_code != ErrorCodes.Ok && responseMessage.header.error_code != ErrorCodes.Default)
{
log.Error("Fatal: " + responseMessage.header.error_message);
return;
}
// dump data
Console.WriteLine("RoutingDataStore response for IndexCompositionMessage : contained vwd codes: " + responseMessage.indexList.Count);
foreach (IndexCompositionEntryMessage indexEntry in responseMessage.indexList)
{
Console.Write(" vwd Code : " + indexEntry.quotationIdentifiers.vwdCode + " || ");
Console.Write(" Instrument type: " + indexEntry.quotationIdentifiers.instrumentType + " || ");
Console.Write(" ISIN : " + indexEntry.quotationIdentifiers.isin + " || ");
Console.Write(" Name : " + indexEntry.quotationIdentifiers.name + " || ");
Console.WriteLine("\r\n___________________________________________________________________________________________________________");
}
}
}
}

Note: Example available in samples folder in Data Manager Connect - Client Distribution".

Gevasys.DataCore
Definition: BinaryUpstreamClient.cs:5
Gevasys.DataCore.Configuration
Definition: ClassFactory.cs:17
Gevasys.DataCore.Webservice
Definition: Webservice.Generated/Reference.cs:11
Gevasys.DataCore.StaticData
Definition: AsyncFileDownloader.cs:10
Gevasys
Definition: BinaryUpstreamClient.cs:5
Examples
Definition: apiinitialize.cs:11
Gevasys.DataCore.StaticData.Http
Definition: AsyncFileDownloader.cs:10

Copyright (C) 2021 Infront Financial Technology GmbH
Mainzer Landstrasse 178 – 190
60327 Frankfurt am Main
Infront Data Manager Connect V4.1