Infront Data Manager Connect Client (.NET)

Request Retransmits

To execute a retransmit the following steps must be done:

1. Create a RetransmitSampleClient (provided in Client Distribution in closed user group at https://www.vwd.com/)
2. Create a RetransmitStore.
3. Create a instance of the RetransmitRequestMessage, fill all necessary parameters and start the retransmit.

using System;
using System.Threading;
using Gevasys.DataCore.Configuration;
using Gevasys.DataCore.RequestData.ProtoBuf.V2;
using Gevasys.DataCore.RequestData.ProtoBuf.V2.Retransmit;
using Gevasys.DataCore.StaticData.Http;
namespace Examples
{
class Retransmit
{
public static void Main()
{
ConfigurationHelper.Initialize();
// Create and start a instance of the Retransmit Push Client
SampleRetransmitClient retransmitClient = new SampleRetransmitClient("RETRANSMIT-PUSH-CLIENT");
retransmitClient.Start();
// Create a RetransmitStore.
RetransmitStore retransmitStore = ConfigurationHelper.CreateRetransmitStore(retransmitClient);
RetransmitRequestMessage requestMessage = new RetransmitRequestMessage();
RequestHeaderMessage requestHeaderBuilder = new RequestHeaderMessage();
requestHeaderBuilder.appId = "DMC";
requestHeaderBuilder.sourceTarget = SourceTargetType.SOURCE_TARGET_DMC;
requestHeaderBuilder.user = ConfigurationHelper.Configuration.UserId;
requestHeaderBuilder.password = ConfigurationHelper.Configuration.Password;
// FIXMErequestHeaderBuilder.authToken = retransmitStore.g.setAuthToken(retransmitStore.getAuthToken());
// required settings
requestMessage.maxBytesPerSecond = 0;
requestMessage.requestID = 3;
// Single retransmit request entry
RetransmitRequestEntryMessage entry = new RetransmitRequestEntryMessage();
// Set retransmit period for last 4 hours
DateTime start = DateTime.Now.AddHours(-4);
DateTime end = DateTime.Now;
// convert to milliseconds since epoch
long startUtc = new DateTimeOffset(start).ToUniversalTime().ToUnixTimeMilliseconds();
long endUtc = new DateTimeOffset(end).ToUniversalTime().ToUnixTimeMilliseconds();
// Set start and end dates
entry.UTCStart = startUtc;
entry.UTCEnd = endUtc;
Console.WriteLine("Start: " + start.ToLongTimeString());
Console.WriteLine("End : " + end.ToLongTimeString());
// It is possible to add single instrument(s) or whole exchange(s)
entry.Symbols.Add("846900.ETR");
entry.Symbols.Add("555750.ETR");
// add exchange(s)
entry.Exchanges.Add("EUWAX");
entry.Exchanges.Add("FFMST");
entry.Exchanges.Add("FXVWD");
requestMessage.requestEntryList.Add(entry);
requestMessage.header = requestHeaderBuilder;
// this will request and start the retransmit
retransmitStore.RequestRetransmit(requestMessage);
// wait for 30 seconds
try
{
Thread.Sleep(30 * 1000);
}
catch (Exception) { }
// shutdown
retransmitStore.Stop();
retransmitClient.Stop();
}
}
}

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.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