1.1.3 ā€¢ Published 1 month ago

@finazon/finazon-grpc-node v1.1.3

Weekly downloads
-
License
-
Repository
github
Last release
1 month ago

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.

1.0.146

1 month ago

1.1.3

1 month ago

1.0.141

2 months ago

1.0.136

3 months ago

1.0.134

3 months ago

1.0.135

3 months ago

1.0.131

3 months ago

1.0.106

7 months ago

1.0.105

7 months ago

1.0.104

7 months ago

1.0.99

7 months ago

1.0.98

7 months ago

0.0.1-alpha.0

7 months ago