Gathering detailed insights and metrics for @factset/sdk-utils
Gathering detailed insights and metrics for @factset/sdk-utils
Gathering detailed insights and metrics for @factset/sdk-utils
Gathering detailed insights and metrics for @factset/sdk-utils
Utilities that support FactSet's SDK in TypeScript
npm install @factset/sdk-utils
Typescript
Module System
Min. Node Version
TypeScript (94.69%)
JavaScript (5.31%)
Total Downloads
112,895
Last Day
107
Last Week
5,931
Last Month
19,368
Last Year
101,356
Apache-2.0 License
1 Stars
284 Commits
2 Watchers
6 Branches
8 Contributors
Updated on Aug 29, 2025
Latest Version
2.1.0
Package Id
@factset/sdk-utils@2.1.0
Unpacked Size
37.31 kB
Size
10.94 kB
File Count
24
Published on
Feb 26, 2025
Cumulative downloads
Total Downloads
Last Day
-21.3%
107
Compared to previous day
Last Week
33.9%
5,931
Compared to previous week
Last Month
45.9%
19,368
Compared to previous month
Last Year
1,924.3%
101,356
Compared to previous year
This repository contains a collection of utilities that supports FactSet's SDK in TypeScript and JavaScript, and facilitate usage of FactSet APIs.
1npm install @factset/sdk-utils
1yarn add @factset/sdk-utils
This library contains multiple modules, sample usage of each module is below.
First, you need to create the OAuth 2.0 client configuration that will be used to authenticate against FactSet's APIs:
1import { ConfidentialClient } from '@factset/sdk-utils'; 2import axios from 'axios'; 3 4async function exampleRequest() { 5 // The ConfidentialClient instance should be reused in production environments. 6 const confidentialClient = new ConfidentialClient('/path/to/config.json'); 7 const accessToken = await confidentialClient.getAccessToken(); 8 9 const response = await axios.get('https://api.factset.com/analytics/lookups/v3/currencies', { 10 headers: { 11 Authorization: `Bearer ${accessToken}`, 12 }, 13 }); 14 15 console.log(response.data); 16} 17 18exampleRequest();
You can pass proxy settings to the ConfidentialClient if necessary. The proxy URL can be passed as an object with the proxyUrl property:
1const confidentialClient = new ConfidentialClient('/path/to/config.json', { proxyUrl: 'http://username:password@proxy.example.com:8080' });
Information about the various utility modules contained in this library can be found below.
The authentication module provides helper classes that facilitate OAuth 2.0 authentication and authorization with FactSet's APIs. Currently, the module has support for the client credentials flow.
Each helper class in the module has the following features:
Configuration
instance that contains information about the OAuth 2.0 client, including the client ID and private key.Classes in the authentication module require OAuth 2.0 client configuration information to be passed to the constructor in the ConfidentialClient
through a JSON-formatted file or a ConfidentialClientConfiguration
object. Below is an example of a JSON-formatted file:
1{ 2 "name": "Application name registered with FactSet's Developer Portal", 3 "clientId": "OAuth 2.0 Client ID registered with FactSet's Developer Portal", 4 "clientAuthType": "Confidential", 5 "owners": ["USERNAME-SERIAL"], 6 "jwk": { 7 "kty": "RSA", 8 "use": "sig", 9 "alg": "RS256", 10 "kid": "Key ID", 11 "d": "ECC Private Key", 12 "n": "Modulus", 13 "e": "Exponent", 14 "p": "First Prime Factor", 15 "q": "Second Prime Factor", 16 "dp": "First Factor CRT Exponent", 17 "dq": "Second Factor CRT Exponent", 18 "qi": "First CRT Coefficient" 19 } 20}
The other option is to pass in the ConfidentialClientConfiguration
instance which is initialised as shown below:
1const confidentialClientConfiguration = { 2 name: "Application name registered with FactSet's Developer Portal", 3 clientId: "OAuth 2.0 Client ID registered with FactSet's Developer Portal", 4 clientAuthType: "Confidential", 5 owners: ["USERNAME-SERIAL"], 6 jwk: { 7 kty: "RSA", 8 use: "sig", 9 alg: "RS256", 10 kid: "Key ID", 11 d: "ECC Private Key", 12 n: "Modulus", 13 e: "Exponent", 14 p: "First Prime Factor", 15 q: "Second Prime Factor", 16 dp: "First Factor CRT Exponent", 17 dq: "Second Factor CRT Exponent", 18 qi: "First CRT Coefficient" 19 } 20};
If you're just starting out, you can visit FactSet's Developer Portal to create a new application and download a configuration file in this format.
If you're creating and managing your signing key pair yourself, see the required JWK parameters for public-private key pairs.
Please refer to the contributing guide.
Copyright 2024 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.
No vulnerabilities found.