Code Monkey home page Code Monkey logo

intrinio-client's Introduction

Intrinio Logo

intrinio-client

  • Unofficial NodeJS SDK for Intrinio
  • The most affordable and flexible financial data on the market.

Quick Start

Create the app:

$ mkdir newApp
$ cd newApp
$ npm init 

Install intrinio-client as a dependency:

$ npm install --save intrinio-client

Example Use

//index.js
var username = "" //Your Intrinio App Username
var password = "" //Your Intrinio App Password
var intrinio = require("intrinio-client")(username, password)

intrinio
.ticker('AAPL')			//All endpoints follow this pattern
.on('complete', function(data, response) {
	//data is the response from the Intrinio API
	//response is the http response
	if(response.statusCode==404){
		console.log("Not found")
	}else if(response.statusCode==200){
		console.log(data)
	}
});

Using "watch"

var username = "" //Your Username
var password = "" //Your Password
var intrinio = require("../index.js")(username, password)

var updateFrequency = 5000    //Duration between each request
var numberOfRequests = 5      //Send this number of requests 

//Traditional Callback Style 
intrinio
.watch
.prices('AAPL', updateFrequency, numberOfRequests, function(watcher){
  watcher
  .on('update', function(data, response){
    //Gets fired 5 times each one 5 seconds after the previous update.
    console.log(data)         //data is the response from the Intrinio API  
    console.log(response)     //response is the http response
  })
  .on('error', function(data, response){
    console.log(data)         //data is the response from the Intrinio API  
    console.log(response)     //response is the http response
  })  
})

//Be careful, 'watch' will easily use up your daily quota if a large number of requests are sent with a very high frequency.
//Available Endpoints
intrinio.prices('AAPL')
.on('complete', function(data, response) {

});
intrinio.companies('AAPL')
.on('complete', function(data, response) {

});
intrinio.securities('AAPL')
.on('complete', function(data, response) {

});
intrinio.indices('AAPL')
.on('complete', function(data, response) {

});
intrinio.data_point('AAPL')
.on('complete', function(data, response) {

});
intrinio.historical_data('AAPL')
.on('complete', function(data, response) {

});
intrinio.news('AAPL')
.on('complete', function(data, response) {

});

Installation

$ npm install intrinio-client

Features

  • Fast, easy configuration

Docs & Community

Goals

  • 100% Intrinio End Point Coverage (Currently ~40%)

Examples

To view the examples, clone the

$ git clone git://github.com/jspenc72/intrinio-client.git --depth 1
$ cd intrinio-client
$ npm install

Then run whichever example you want:

$ node examples/example.js

Tests

To run the test suite, first install the dependencies, then run npm test:

$ npm install
$ npm test

People

The original author of Intrinio-Client is @Jspenc72

License

MIT

intrinio-client's People

Contributors

jspenc72 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.