dxFeed / dxfeed-graal-net-api

For .NET developers, this library offers easy access to dxFeed market data. Built upon the GraalVM Native Image and our flagship dxFeed Java API, it provides a seamless experience for .NET-based applications
Mozilla Public License 2.0
11 stars 6 forks source link

No CallBack at all #54

Open gowthamnatarajan opened 6 months ago

gowthamnatarajan commented 6 months ago

Hi,

Even if I use the default DXFeed method, my event listener never gets called back. What could be the reason?

var subscription= DXFeed.GetInstance().CreateSubscription(typeof(Quote));
subscription.AddEventListener(events =>
{
    foreach (var e in events)
    {
        Console.WriteLine(e);
    }
});
subscription.AddSymbols("AAPL");

I have a breakpoint inside the Event listener and the breakpoint never gets triggered.

stdcion commented 6 months ago

Hello @gowthamnatarajan

To use the default application-wide singleton instance of DXFeed, you must pre-configure the address via SystemProperties, or the dxfeed.properties file. Take a look at this example.

Directly from the code, you can do it like this:

SystemProperty.SetProperty("dxfeed.address", "demo.dxfeed.com:7300");
var sub = DXFeed.GetInstance().CreateSubscription(typeof(Quote));