Real Time Finance is a simple websocket public API to get real-time stock prices. The following markets are available at the moment :
- Forex
- US and European stocks companies (around 10K stocks)
npm install ws
Use stock symbol to receive datas. In this example we use EURUSD (forex), AAPL (apple - nasdaq), MSFT (microsoft - nasdaq) and MC.PA (lvmh - cac40)
const WebSocket = require('ws');
const ws = new WebSocket("wss:https://api.realtimefinance.io", {
headers: {
"API-X-KEY": "demo",
"symbol" : "EURUSD,AAPL,MSFT,MC.PA"
}
});
ws.on('message', function incoming(msg) {
console.log(msg);
});
Here after you can find JSON list with symbols :
Further infos: https://realtimefinance.io