npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@finazon/finazon-grpc-node

v1.2.1

Published

Finazon gRPC client library for Node.js

Downloads

28

Readme

Finazon Node.js gRPC Client

This is the official Node.js library for Finazon, offering access to:

  • Lists of datasets, publishers, markets, and tickers.
  • Market data: ticker snapshots, time series, trades, and technical indicators.
  • Data from specific datasets such as Benzinga, Binance, Crypto, Forex, SEC, and SIP.
  • Full compatibility with both JavaScript and TypeScript.

🔑 API key is essential. If you haven't got one yet, sign up here.

Installation requirements

Ensure you have Node.js v18.0.0 or later. We recommend the latest LTS version. Use nvm (macOS/Linux) or nvm-windows for Node version management across projects.

Using npm

npm install @finazon/finazon-grpc-node --save

Using yarn

yarn add @finazon/finazon-grpc-node

🔗 View the package on npm.

Quick start

1. Set up a new project

mkdir hello-finazon && cd hello-finazon
npm init -y
npm install --save-dev @finazon/finazon-grpc-node

2. Create hello-world.js script

const { GetTimeSeriesRequest } = require('@finazon/finazon-grpc-node/time_series_pb');
const { TimeSeriesService } = require('@finazon/finazon-grpc-node/time_series_service');

const API_KEY = 'your_api_key';

const service = new TimeSeriesService(API_KEY);

const request = new GetTimeSeriesRequest();
request.setDataset('sip_non_pro');
request.setTicker('AAPL');

service.getTimeSeries(request, (err, value) => {
  if (err) {
    console.error(err);
    return;
  }
  console.log(JSON.stringify(value.toObject(), null, 2));
});

3. Input your API key

Replace 'your_api_key' with your actual key.

4. Run the example

node hello-world.js

📝 Expected output:

{
  "resultList": [
    {
      "timestamp": 1698438120,
      "open": 167.85,
      "close": 167.83,
      "high": 167.91,
      "low": 167.83,
      "volume": 2020
    },
    {
      "timestamp": 1698436740,
      "open": 168.095,
      "close": 168.22,
      "high": 168.34,
      "low": 168.06,
      "volume": 7874313
    },
    // ...
    {
      "timestamp": 1698435060,
      "open": 168.07,
      "close": 167.965,
      "high": 168.1,
      "low": 167.96,
      "volume": 131572
    }
  ]
}

👀 Check the full example and other examples here

RPC support

The following table outlines the supported rpc calls: |Service |rpc |Description | |-----------------------|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| | ApiUsageService | getApiUsage | Get a list of products with quota limit/usage | | BenzingaService | getDividentsCalendar | Returns the dividends calendar from Benzinga | | BenzingaService | getEarningsCalendar | Returns the earnings calendar from Benzinga | | BenzingaService | getNews | Returns the news articles from Benzinga | | BenzingaService | getIPO | Returns IPO data from Benzinga | | BinanceService | getTimeSeries | Get time series data without technical indicators | | CryptoService | getTimeSeries | Get time series data for any given ticker | | DatasetsService | getDatasets | Get a list of all datasets available at Finazon. | | ExchangeService | getMarketsCrypto | Returns a list of supported crypto markets | | ExchangeService | getMarketsStocks | Returns a list of supported stock markets | | ForexService | getTimeSeries | Get time series data for any given ticker | | PublisherService | getPublishers | Get a list of all publishers available at Finazon. | | SecService | getFilings | Real-time and historical access to all forms, filings, and exhibits directly from the SEC's EDGAR system. | | SipService | getTrades | Returns detailed information on trades executed through the Securities Information Processor (SIP) | | SipService | getMarketCenter | Returns a list of market centers | | SnapshotService | getSnapshot | This endpoint returns a combination of different data points, such as daily performance, last quote, last trade, minute data, and previous day performance. | | TickersService | findTickersStocks | This API call returns an array of stocks tickers available at Finazon Data API. This list is updated daily. | | TickersService | findTickersCrypto | This API call returns an array of crypto tickers available at Finazon Data API. This list is updated daily. | | TickersService | findTickersForex | This API call returns an array of forex tickers available at Finazon Data API. This list is updated daily. | | TickersService | findTickersUS | This API call returns an array of US tickers available at Finazon Data API. This list is updated daily. | | TimeSeriesService | getTimeSeries | Get time series data without technical indicators | | TimeSeriesService | getTimeSeriesAtr | Get time series data for ATR technical indicator. | | TimeSeriesService | getTimeSeriesBBands | Get time series data for BBands technical indicator. | | TimeSeriesService | getTimeSeriesIchimoku | Get time series data for Ichimoku technical indicator. | | TimeSeriesService | getTimeSeriesMa | Get time series data for Ma technical indicator. | | TimeSeriesService | getTimeSeriesMacd | Get time series data for Macd technical indicator. | | TimeSeriesService | getTimeSeriesObv | Get time series data for Obv technical indicator. | | TimeSeriesService | getTimeSeriesRsi | Get time series data for Rsi technical indicator. | | TimeSeriesService | getTimeSeriesSar | Get time series data for Sar technical indicator. | | TimeSeriesService | getTimeSeriesStoch | Get time series data for Stoch technical indicator. | | TradeService | getTrades | Returns general information on executed trades |

Here's how you can import client and request objects:

const { ServiceNameService } = require('@finazon/finazon-grpc-node/service_name_service');
const { RpcNameRequest } = require('@finazon/finazon-grpc-node/service_name_pb');

// ...

const service = new ServiceNameService(API_KEY);
const request = new RpcNameRequest();
service.rpcName(request, (err, value) => {});

Documentation

Delve deeper with our official documentation.

Examples

Explore practical scenarios in the examples directory.

Support

Stay updated

Contributing

  1. Fork and clone: $ git clone https://github.com/finazon-io/finazon-grpc-node.git.
  2. Branch out: $ cd finazon-grpc-node && git checkout -b my-feature.
  3. Commit changes and test.
  4. Push your branch and open a pull request with a comprehensive description.

For more guidance on contributing, see the GitHub Docs on GitHub.

License

This project is licensed under the MIT License. See the LICENSE.txt file in this repository for more details.