newsfilter.io - Stock Market News API

newsfilter.io - Stock Market News API

  • Home

›Stream API

Getting Started

  • Introduction
  • News Sources
  • Companies & Exchanges

Query API

  • Intro
  • API Endpoint
  • Authentication
  • Request & Response Formats
  • Example: Python
  • Example: cURL
  • Example: Node.js
  • Tutorials

Stream API

  • Intro
  • API Endpoint
  • Authentication
  • Message Format
  • Example: Python
  • Example: Node.js

Content Render API

  • Overview

Integrations

  • Discord

Node.js Example

Install socket.io for Node:

npm i socket.io-client

The example below creates a socket.io client, connects to our server and prints all articles as they are received.

const io = require('socket.io-client');

const apikey = 'your-api-key';

const socket = io.connect('http://stream.newsfilter.io?apiKey=' + apikey);

socket.on('connect', function () {
  console.log('connected');
});

socket.on('articles', function (articles) {
  console.log(articles);
});
← Example: PythonOverview →
newsfilter.io - Stock Market News API
Docs
Getting StartedQuery APIStream API
Contact
support@newsfilter.io
Social
Follow @newsfilterio
Follow Us on Stocktwits
Copyright © 2021 newsfilter.io