Hi,
I can't find any example anywhere of a C# console application to receive streaming quotes.
I'm a bit lost with the code for connection to Lightstreamer, sending request and receiving data.
Obviously, I've been through the examples both on IG and Lightstreamer websites and I've dne my research on Google, stackoverflow, etc. but unsucessfully...
Any help would be much appreciated
I managed to connect (I think) so here is the code I used. Feel free to use if helpful
I'm now working on sending a subscription
static void Main(string[] args)
{
ConnectionInfo connInfo = new ConnectionInfo();
LSClient lsClient = new LSClient();
IGStreamingApiClient listener = new IGStreamingApiClient();
string lsUrl = "https://apd.marketdatasystems.com";
string xst = "xxx"; //my XST chain
string cst = "yyy"; //my CST chain
connInfo.PushServerUrl = lsUrl;
connInfo.Password = "CST-" + cst + "|XST-" + xst;
lsClient.OpenConnection(connInfo, listener);
Console.ReadKey();
}
I had to implement the interface IConnectionListener like this (in another namespace)
public class IGStreamingApiClient : IConnectionListener
{
private LSClient lsClient;
public IGStreamingApiClient()
{
try
{
lsClient = new LSClient();
}
catch (Exception)
{
}
}
public virtual void OnConnectionEstablished()
{
Console.WriteLine("Success");
}