I'm writing an API where I want to stream data to my API (as a client) from an external stock company via websockets, and then output it to connected clients to my API via signal R.
I have been able to get my API as a signalR serve working as per the docs, and stream values in a loop to my connected client (Console App).
My question revolves around how I'll set up the API as a client to receive the websocket stock data and then push it out to subscribers to my signalR hub.
Do I want to have a background service polling a websocket then write the same channel as my signalR hub using the IHubContext?
Or is there a way in middleware I can push data received to my API out to my connected clients?
I'm new to this and unsure of which approach I want to take and I can't find any docs relating to this.
Clients <--signalR--> API <---Websockets---> Finance server