FinnhubRealtime is a .Net Standard 2.1 client library for receiving Finnhub.io real-time price updates via the websocket interface. A small demo application can be found in this repository.
using var cl = new WebsocketClient("YOUR API TOKEN");
await cl.Connect();
await cl.Subscribe("AAPL");
while (true)
{
var msg = await cl.Receive();
if (msg is TradeMessage trade) {
var tradeStr = string.Join("\n", trade.Data.Select(t => $"{t.S} - #{t.V} x {t.P}"));
Console.WriteLine(tradeStr);
}
}