0.40.1 • Published 10 days ago

@factset/sdk-standarddatafeed v0.40.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
10 days ago

FactSet

Standard Datafeed client library for JavaScript

API Version npm Apache-2 license

The Standard DataFeed (SDF) Download API provides an alternative method for users to request and retrieve SDF packages (schemas & bundles). This service is not a direct replacement and does not have 100% feature parity with the Loader Application. This API provides an alternative for users who are unable to utilize the Loader application due to the following reasons:

  • Inability to install 3rd party executables due to Corporate Security policies.

  • Inability to utilize the Loader application due to limitations or restrictions with the environment used to consume Standard Datafeed.

  • Clients who are utilizing existing delivery methods like FTP, who may want to use a more secure & modern solution.

This API allows users to retrieve

  • Both SDF and the QFL (Quant Factor Library (Factor Family & Factor Groups)) packages they have subscriptions for, with data available since January 1, 1995.

Additional parameters are available to filter requests to get the exact files users are looking for.

QFL data is delivered through Content API & Bulk Data API (SDF API).

  • Content API: Provides direct access to FactSet-hosted QFL data. Suitable for interactive, ad hoc QFL requests. Constraints on large extracts. Costs are based on consumption, i.e. more calls can result in more costs.

  • Bulk Data API: Provides access to download locations of zip files for client download. Suitable for production processes within a client environment. Cost is based on the use case and fixed unless scope changes (same as other SDFs).

Please find all the content-related comprehensive documentation here.

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

  • API version: 2.0.0
  • SDK version: 0.40.1
  • Build package: com.factset.sdk.codegen.FactSetJavascriptClientCodegen

For more information, please visit https://developer.factset.com/contact

Requirements

  • Node.js >= 14

Installation

npm

npm install @factset/sdk-utils @factset/sdk-standarddatafeed@0.40.1

yarn

yarn add @factset/sdk-utils @factset/sdk-standarddatafeed@0.40.1

Usage

  1. Generate authentication credentials.
  2. Setup Node.js environment

    1. Install and activate Node.js >=14. If you're using nvm:

      nvm install 16
      nvm use 16
    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, SDFAndQFLContentLibraryApi } = require('@factset/sdk-standarddatafeed');
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 SDFAndQFLContentLibraryApi();
const opts = {
  'schema': fgp_v1, // String | Name of the schema.
  'bundle': fgp_global_prices_am_v1, // String | Name of the bundle.
  'type': "'delta'", // String | Type of the file.  Note: - Full files are snapshots of the bundle capturing the most recent version of the bundle generated every weekend. When requesting 'Full' files, ensure that the date range includes weekend dates. - Delta files include the incremental changes (inserts, updates, deletes), since the last file and have incremental sequence numbers.   
  'startDate': 2023-01-01, // String | The earliest date of the feed file the API should fetch based on the file timestamp. Consider the following points:   - Dates provided in `startDate` and `endDate` along with `schema` parameter: The returned dataset is limited to a maximum of latest 30 days' worth of records. - Format: Should be absolute (YYYY-MM-DD). 
  'startDateRelative': 56, // Number | The earliest date of the feed file the API should fetch based on the file timestamp. Consider the following points:  - Dates provided in `startDate` and `endDate` along with `schema` parameter: The returned dataset is limited to a maximum of latest 30 days' worth of records. - Format: Specify the date using a relative term as an integer: '0' for today, '-1' for yesterday, '-2' for two days ago, and so forth. Negative values are used to represent past dates.  *Note:* - *Either `startDate` or `startDateRelative` should be used, but not both.* - *If both `startDate` and `startDateRelative` are provided in the same request, the API will return an error.* - *If users provide future dates in requests for `startDate` or `startDateRelative`, the API will not return any data.* 
  'endDate': 2023-01-28T00:00:00.000Z, // String | The latest date of the feed file the API should fetch for based on the file timestamp.  - Format: Should be absolute - YYYY-MM-DD. 
  'endDateRelative': 56, // Number | The latest date of the feed file the API should fetch for based on the file timestamp.  - Format: Specify the date using a relative term as an integer: '0' for today, '-1' for yesterday, '-2' for two days ago, and so forth. Negative values are used to represent past dates.  *Note:* - *Either `endDate` or `endDateRelative` should be used, but not both.* - *If both `endDate` and `endDateRelative` are provided in the same request, the API will return an error.* - *If users provide future dates in requests for `endDate` or `endDateRelative`, the API will not return any data.* 
  'paginationLimit': 20, // Number | Specifies the number of results to return per page.
  'paginationOffset': 0, // Number | Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results.
  'sort': ["null"] // [String] | Enables sorting data in ascending or descending chronological order based on startDate. 
};

// Call api endpoint
apiInstance.getListFiles(opts).then(
  data => {

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

Documentation for API Endpoints

All URIs are relative to https://api.factset.com/bulk-documents/sdf/v2

ClassMethodHTTP requestDescription
standarddatafeed.SDFAndQFLContentLibraryApigetListFilesGET /list-filesReturns delta & full files for the schemas.
standarddatafeed.SDFAndQFLContentLibraryApigethistoricalFilesGET /historical-filesReturns full historic data of specified schema and bundle.
standarddatafeed.SchemaApigetListSchemaswithoutwithooutRequiredParametersGET /list-schemasList of Standard DataFeed (SDF) schemas.
standarddatafeed.SchemaApigetSchemaDetailsGET /schema-detailsSchema Details.

Documentation for Models

Documentation for Authorization

FactSetApiKey

  • Type: HTTP basic authentication

FactSetOAuth2

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes: N/A

Contributing

Please refer to the contributing guide.

Copyright

Copyright 2022 FactSet Research Systems Inc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

0.40.1

10 days ago

0.40.0

2 months ago

0.21.6

2 months ago

0.21.5

7 months ago

0.21.4

8 months ago

0.21.3

11 months ago

0.21.2

11 months ago

0.21.1

2 years ago

0.21.0

2 years ago

0.20.0

2 years ago