real time stock screener websocket api
Screen stocks, Forex pairs, and crypto simultaneously using WebSocket multi-symbol streams and server-side filter logic.
WebSocket screener with move threshold
const ws = new WebSocket(
"wss://api.realmarketapi.com/price?symbolCode=AAPL&timeFrame=M1&apiKey=YOUR_KEY"
);
const THRESHOLD = 0.5; // % move
ws.onmessage = (e) => {
const { ClosePrice, OpenPrice, SymbolCode } = JSON.parse(e.data);
const pct = ((ClosePrice - OpenPrice) / OpenPrice) * 100;
if (Math.abs(pct) >= THRESHOLD) {
console.log(`Screener hit: ${SymbolCode} moved ${pct.toFixed(2)}%`);
}
};