Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

streetinsider-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streetinsider-api

streetinsider.com real-time news API

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

streetinsider.com Real-Time News API

  • streetinsider.com real-time news API
  • Supports client-side (React, Angular, Vue, etc.), and server-side (Node.js, Next, etc.) JavaScript

Getting Started

  • npm install streetinsider-api

Example

const api = require('streetinsider-api');

api.init('YOUR_TOKEN'); // set your API token

api.on('news', function handleNews(news) {
  console.log(news); // news is a JSON object
  console.log(news.headline); // print headline
  // handle newly incoming article
});

Example News

{
  distributor: 'GW2',
  id: 14963798,
  datePublished: '2019-01-02 09:43:02',
  headline: 'OraSure Technologies, Inc.: Updated Release to Clarify Timing of Presentation',
  categories: [ 'Press Releases' ],
  symbols: [ 'OSUR' ],
  link: 'https://www.streetinsider.com/Press+Releases/OraSure+Technologies,+Inc.:Â%C2%A0Updated+Release+to+Clarify+Timing+of+Presentation/14963798.html',
  markets: [ 'NQ' ],
  entities: [ 80 ],
  important: false
}

Documentation

.init(token)

Initialises the API with your API token.

  • token (string) - represents your API token

.on(message, callback)

Event listener listening for newly incoming news. Calls the callback function as soon as a new article arrived.

  • message (string) - always set to news
  • callback (function) - used to handle a newly incoming article.

Article Attributes

  • distributor (string, optional) - abbreviation of the article distributor, e.g. PN, or BW
  • id (int, optional) - unique article id, e.g. 14963826. Is not always set.
  • datePublished (string) - publication date and time, e.g. 2019-01-02 09:56:20
  • headline (string) - headline of the article, e.g. 'Excelitas Technologies Completes Acquisition of Axsun Technologies
  • body (string, optional) - article body (can be HTML), e.g. <p>Baird analyst Mark Altschwager lowered the ...
  • categories (array) - an array of article categories, e.g. [ 'Press Releases' ]
  • symbols (array) - array of tickers the article relates to, e.g. [ 'JHML', 'JHSC' ]
  • link (string) - article link, e.g. https://www.streetinsider.com/Press+Releases/SME+Education+Foundation+Names+Rob+Luce+Vice+President/14963849.html
  • markets (array) - array of markets the article relates to, e.g. [ 'NY' ]

Keywords

FAQs

Package last updated on 03 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc