Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
intrinio-client
Advanced tools
Readme
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.
//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) {
});
$ npm install intrinio-client
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
To run the test suite, first install the dependencies, then run npm test
:
$ npm install
$ npm test
The original author of Intrinio-Client is @Jspenc72
FAQs
NodeJS client for the Intrinio API
The npm package intrinio-client receives a total of 10 weekly downloads. As such, intrinio-client popularity was classified as not popular.
We found that intrinio-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.