Infront Data Manager Connect Client (.NET)

Subscribe Instruments

To subscribe one or more instruments use the following code: (please note: error handling is very limited to display the usage)

using Gevasys.DataCore.Configuration;
using Gevasys.DataCore.Consumer.Manager;
using Gevasys.DataCore.Core;
namespace Examples
{
class SubscribeInstrument
{
public void Main()
{
// initialize DMC
ConfigurationHelper.Initialize();
// this client will recieve updates
SamplePushClient pushClient = new SamplePushClient("subscribe-test");
//Create a streaming consumer store.
ConsumerStore streamingStore = ConfigurationHelper.CreateConsumer(pushClient);
if (streamingStore == null)
return;
//Subscribe Telekom on XETRA.
streamingStore.AddInstrument("555750.ETR");
// updates will arive in the push client via callback
// you can also subscribe a list of instruments / listings
InstrumentList list = new InstrumentList();
list.Add("710000.ETR");
list.Add("846900.ETR");
list.AppendFromFile("filename_with_listings.txt");
streamingStore.AddInstruments(list);
//Unsubscribe a instrument.
streamingStore.RemoveInstrument("555750.ETR");
}
}
}

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.Consumer.Manager
Definition: ConsumerStore.cs:16
Gevasys
Definition: BinaryUpstreamClient.cs:5
Gevasys.DataCore.Core
Definition: CompressionHelper.cs:7
Gevasys.DataCore.Consumer
Definition: ConsumerStore.cs:16
Examples
Definition: apiinitialize.cs:11

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