I'm using the CoinGecko api to get real-time price data on several cryptocurrencies in an ASP.NET Core MVC web application. CoinGecko's price data is updated every 1-10 minutes, so I want to request price data probably every 5 minutes. I want the data to refresh on the client-side so the user doesn't have to refresh the page to see up-to-date data. I want that data to be displayed in a line graph chart.
I want to make sure I'm thinking about this correctly so here's my current thought process:
I can use SignalR to create an open connection between the client and the server, so the client does not have to refresh to get coingecko api data. I chose SignalR because it will choose the best transport technique for the situation, and I know very little about websockets, long-polling, etc.
As far as displaying that data, I've decided to use the Highcharts library, since it's easy to learn.
So essentially my question is, how do I get real time web api data at set intervals and display it in a chart without having to refresh the client? Is my thought process correct?
Any helpful insights or links to articles would be appreciated. I'm not really sure how to proceed so I want to make sure I'm not wasting my time.