'how to display real time change in stock price in ionic app
I have a 3rd party api https://api.twelvedata.com/time_series?symbol=TEST_SYMBOL&interval=1day&apikey=YOUR_API_KEY I have displayed stock price list in the cards. Now I have to show the real time data of each card with each sec changes how do i do that. i have tried many ways but entire api is getting fetched instead of updating data of single card.
Solution 1:[1]
Yes, the api provided supports websocket configuration. but if the api is loaded it does not change price i have to refresh the browser and check the price change
Solution 2:[2]
Does your API support WebSockets?
What are WebSockets? Websocket is a full-duplex protocol that allows real-time communication between client and web server through emitting and listening for events.
check this link for more https://en.wikipedia.org/wiki/WebSocket
Websockets with angular
https://javascript-conference.com/blog/real-time-in-angular-a-journey-into-websocket-and-rxjs/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Navjot singh |
| Solution 2 |
