Infront Data Manager Connect Client (.NET)

Subscribe Exchanges

To subscribe one or more exchanges use the following code:

using Gevasys.DataCore.Configuration;
using Gevasys.DataCore.Consumer.Manager;
using Gevasys.DataCore.Common;
namespace Examples
{
class SubscribeExchange
{
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 XETRA
streamingStore.AddExchange("ETR");
// multiple exchanges can be subscribed
streamingStore.AddExchange("STG");
// updates will arive in the push client via callback
//Unsubscribe exchange
streamingStore.RemoveExchange("ETR");
}
}
}

or subscribe exchanges using a filter element:

using Gevasys.DataCore.Configuration;
using Gevasys.DataCore.Consumer.Manager;
using Gevasys.DataCore.Common;
namespace Examples
{
class SubscribeExchangeFilterElement
{
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 exchange XETRA and Equity security type
streamingStore.AddFilter(new FilterElement { ExchangeCode = "ETR", SecurityType = SecurityType.Equity });
}
}
}

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