Giter Site home page Giter Site logo

unibit-api / unibit-js Goto Github PK

View Code? Open in Web Editor NEW
14.0 6.0 3.0 36 KB

The Javascript SDK for the UniBit API

License: MIT License

JavaScript 100.00%
financial-data financial financial-analysis financial-api unibit-api unibit javascript-api node-api

unibit-js's Introduction

unibit

A Javascript module to get stock data and news from the UniBit API

UniBit is a free API that provides real time and historical financial data, as well as financial news. This SDK is a quick starter for the UniBit API (https://www.unibit.ai) which has Javascript functions (return a Promise) for each available API call. For the UniBit API documentation, visit (https://unibit.ai/docs/V2.0/introduction)

To get started, sign up at (https://unibit.ai/signin) to request a free access key. With a free key, all non-news API features are available with generous rate limits.

The UniBit Stock News API requires a premium account, but in return gives a wealth of news articles on all 8000 US-listed companies. Along with this, UniBit provides analyses on each news article. With deep learning, each article is classified into a comprehensive genre list, and named entities and sentiment are also extracted.

Install

To install UniBit, type:

npm install --save unibit-js

Examples

Get the real time price of Apple (AAPL)

const unibit = require("unibit-js")({ AccessKey: "demo" }).v2;

params = {
  tickers: "AAPL",
}
unibit.stockPrice.getPricesRealTime(params)
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.log(error);
  });

Get Apple's Company Profile

const unibit = require("unibit-js")({ AccessKey: "demo" }).v2;

params = {
  tickers: "AAPL"
};
unibit.companyInfo.getCompanyProfile(params)
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.log(error);
  });

Get the latest news on Apple

const unibit = require("unibit-js")({ AccessKey: "demo" }).v2;

params = {
  tickers: "AAPL"
};
unibit.companyInfo.getStockNews(params)
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.log(error);
  });

Contribute

In the UniBit Javascript SDK, we not only want to wrap the UniBit API, but open source methods of stock analysis, be it with some fancy quantitative strategy, with graphing, or with machine learning. Propose something in an issue or contact me at [email protected] if you want to help!

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.