Open gowthamnatarajan opened 6 months ago
Hello @gowthamnatarajan
Most likely you're connecting to dxLink. For token-based authorization, use the following address format: "dxlink:wss://demo.dxfeed.com/dxlink-ws[login=dxlink:token]"
Here's an example of how to do it:
using System;
using DxFeed.Graal.Net;
using DxFeed.Graal.Net.Api;
using DxFeed.Graal.Net.Events.Market;
// Enable experimental feature.
SystemProperty.SetProperty("dxfeed.experimental.dxlink.enable", "true");
// Set scheme for dxLink.
SystemProperty.SetProperty("scheme", "ext:opt:sysprops,resource:dxlink.xml");
// For token-based authorization, use the following address format:
// "dxlink:wss://demo.dxfeed.com/dxlink-ws[login=dxlink:token]"
using var endpoint = DXEndpoint.Create().Connect("dxlink:wss://demo.dxfeed.com/dxlink-ws");
using var subscription = endpoint.GetFeed().CreateSubscription(typeof(Quote));
subscription.AddEventListener(events =>
{
foreach (var e in events)
{
Console.WriteLine(e);
}
});
subscription.AddSymbols("AAPL");
Console.ReadKey();
My Broker has provided me with the link to connect and it does not have a port. Its something like wss://abc.dxfeed.com/realtime
How do I authenticate with a token?