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

@factset/sdk-stocksapifordigitalportals

v0.11.0

Published

Stocks API for Digital Portals client library for JavaScript

Downloads

110

Readme

FactSet

Stocks API for Digital Portals client library for JavaScript

API Version npm Apache-2 license

The Stocks API features a screener to search for equity instruments based on stock-specific parameters.

Parameters for up to three fiscal years might now be used in one request; data is available for the ten most recent completed fiscal years. Estimates are available for the current and two consecutive fiscal years. Search criteria also include benchmark-related attributes (beta, correlation, outperformance), and ESG parameters, based on FactSet’s Truvalue ESG scores.

A separate endpoint returns the possible values and value ranges for the parameters that the endpoint /stock/notation/screener/search accepts Application developers can request the values and value ranges only for a restricted set of notations that match predefined parameters. This functionality may be used to pre-fill the values and value ranges of the parameters of the /stock/notation/screener/search endpoint so that performing a search always leads to a non-empty set of notations.

The endpoint /stock/notation/ranking/intraday/list ranks stocks notations using intraday figures, for example to build a gainers/losers list.

Additional endpoints include end-of-day benchmark key figures, and selected fundamentals (as of end of fiscal year and with daily updates).

This API is fully integrated with the corresponding Quotes API, allowing access to detailed price and performance information of instruments, as well as basic security identifier cross-reference. For direct access to price histories, please refer to the Time Series API for Digital Portals.

Similar criteria based screener APIs exist for fixed income instruments and securitized derivatives: See the Bonds API and the Securitized Derivatives API for details.

See also the recipe "Enrich Your Digital Portal with Flexible Equity Screening".

This TypeScript/JavaScript package is automatically generated by the OpenAPI Generator project:

  • API version: 2
  • SDK version: 0.11.0
  • Build package: com.factset.sdk.codegen.FactSetJavascriptClientCodegen

Requirements

  • Node.js >= 18

Installation

npm

npm install @factset/sdk-utils @factset/[email protected]

yarn

yarn add @factset/sdk-utils @factset/[email protected]

Usage

  1. Generate authentication credentials.
  2. Setup Node.js environment
    1. Install and activate Node.js >=18. If you're using nvm:

      nvm install 18
      nvm use 18
    2. (optional) Install yarn.

  3. Install dependencies.
  4. Run the following:

[!IMPORTANT] The parameter variables defined below are just examples and may potentially contain non valid values. Please replace them with valid values.

Example Code

const { ApiClient, CompanyApi } = require('@factset/sdk-stocksapifordigitalportals');
const { ConfidentialClient } = require('@factset/sdk-utils');

const apiClient = ApiClient.instance;

// Examples for each supported authentication method are below,
// choose one that satisfies your use case.

// (Preferred) OAuth 2.0: FactSetOAuth2
// See https://github.com/FactSet/enterprise-sdk#oauth-20
// for information on how to create the app-config.json file
//
// The confidential client instance should be reused in production environments.
// See https://github.com/FactSet/enterprise-sdk-utils-typescript#authentication
// for more information on using the ConfidentialClient class
apiClient.factsetOauth2Client = new ConfidentialClient('/path/to/app-config.json');

// Basic authentication: FactSetApiKey
// See https://github.com/FactSet/enterprise-sdk#api-key
// for information how to create an API key
// const FactSetApiKey = apiClient.authentications['FactSetApiKey'];
// FactSetApiKey.username = 'USERNAME-SERIAL';
// FactSetApiKey.password = 'API-KEY';

const apiInstance = new CompanyApi();
const id = "id_example"; // String | 
const opts = {
  'attributes': ["null"], // [String] | Limit the attributes returned in the response to the specified set.
  'language': "language_example" // String | 
};

// Call api endpoint
apiInstance.getCompanyBoardListByInstrument(id, opts).then(
  data => {

    console.log('API called successfully. Returned data:');
    console.log(data);
  },
  error => {
    console.error(error);
  },
);

Using a Proxy

To add a HTTP proxy for the API client, you can set the proxyUrl for the ApiClient instance:

const { ApiClient } = require('@factset/sdk-stocksapifordigitalportals');

const apiClient = ApiClient.instance;
apiClient.setProxyUrl('http://username:[email protected]:8080');

Documentation for API Endpoints

All URIs are relative to https://api.factset.com/wealth/v1

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- stocksapifordigitalportals.CompanyApi | getCompanyBoardListByInstrument | GET /company/board/listByInstrument | List of boards for a company, with their officers. stocksapifordigitalportals.CompanyApi | getCompanyBoardOfficerFunctionDeliveryList | GET /company/board/officer/function/delivery/list | List of officer functions as provided by a delivery. stocksapifordigitalportals.CompanyApi | getCompanyBoardTypeList | GET /company/board/type/list | List of company board types. stocksapifordigitalportals.CompanyApi | postCompanyEstimatesListByInstrument | POST /company/estimates/listByInstrument | Estimates for selected figures for a stock. stocksapifordigitalportals.CompanyApi | postCompanyKeyItemsCurrentGetByInstrument | POST /company/keyItems/current/getByInstrument | Fundamentals for a stock with potentially daily updates. stocksapifordigitalportals.CompanyApi | postCompanyKeyItemsFiscalYearListByInstrument | POST /company/keyItems/fiscalYear/listByInstrument | Selected fundamentals for a stock with values as of the end of a fiscal year. stocksapifordigitalportals.StockApi | getStockCompositeProfileGetByNotation | GET /stock/composite/profile/getByNotation | Provides key elements of a stock profile together with the profile of the issuing company. stocksapifordigitalportals.StockApi | getStockDividendTypeList | GET /stock/dividend/type/list | List of dividend types. stocksapifordigitalportals.StockApi | getStockNotationKeyFiguresBenchmarkMonth1Get | GET /stock/notation/keyFigures/benchmark/month/1/get | End-of-day (EOD) benchmark key figures of a stock for the time range of one month. stocksapifordigitalportals.StockApi | getStockNotationKeyFiguresBenchmarkMonth3Get | GET /stock/notation/keyFigures/benchmark/month/3/get | End-of-day (EOD) benchmark key figures of a stock for the time range of three months. stocksapifordigitalportals.StockApi | getStockNotationKeyFiguresBenchmarkMonth6Get | GET /stock/notation/keyFigures/benchmark/month/6/get | End-of-day (EOD) benchmark key figures of a stock for the time range of six months. stocksapifordigitalportals.StockApi | getStockNotationKeyFiguresBenchmarkWeek1Get | GET /stock/notation/keyFigures/benchmark/week/1/get | End-of-day (EOD) benchmark key figures of a stock for the time range of one week. stocksapifordigitalportals.StockApi | getStockNotationKeyFiguresBenchmarkYear1Get | GET /stock/notation/keyFigures/benchmark/year/1/get | End-of-day (EOD) benchmark key figures of a stock for the time range of one year. stocksapifordigitalportals.StockApi | getStockNotationKeyFiguresBenchmarkYear3Get | GET /stock/notation/keyFigures/benchmark/year/3/get | End-of-day (EOD) benchmark key figures of a stock for the time range of three years. stocksapifordigitalportals.StockApi | getStockNotationKeyFiguresBenchmarkYear5Get | GET /stock/notation/keyFigures/benchmark/year/5/get | End-of-day (EOD) benchmark key figures of a stock for the time range of five years. stocksapifordigitalportals.StockApi | getStockOwnerList | GET /stock/owner/list | List of owners for a specific type of a company's shares. stocksapifordigitalportals.StockApi | getStockRecommendationAggregateGet | GET /stock/recommendation/aggregate/get | Target price and aggregated recommendations for a stock. stocksapifordigitalportals.StockApi | getStockRecommendationAggregateHistoryList | GET /stock/recommendation/aggregate/history/list | Current and historical trade recommendations and target prices for a stock. stocksapifordigitalportals.StockApi | postStockDividendList | POST /stock/dividend/list | List of dividends for a stock. stocksapifordigitalportals.StockApi | postStockNotationRankingIntradayList | POST /stock/notation/ranking/intraday/list | Ranking of stocks' notations using intraday figures. stocksapifordigitalportals.StockApi | postStockNotationScreenerSearch | POST /stock/notation/screener/search | Screener for stocks' notations based on stock-specific parameters. stocksapifordigitalportals.StockApi | postStockNotationScreenerValueRangesGet | POST /stock/notation/screener/valueRanges/get | Possible values and value ranges for the parameters used in the endpoint `/stock/notation/screener/search`.

Documentation for Models