@factset/sdk-factsetfunds
v0.40.1
Published
FactSet Funds client library for JavaScript
Readme
FactSet Funds client library for JavaScript
FactSet Mutual Funds and ETFs Reference provides fund-specific reference information as well as FactSet's proprietary classification system. It includes but is not limited to the following coverage
- Fund descriptions
- A seven-tier classification system
- Leverage information
- Fees and expenses
- Portfolio managers
FactSet Mutual Funds Time Series provides quantitative data items on a historical basis. It includes but is not limited to the following coverage
- Net asset value
- Fund flows
- Assets under management
- Total return
In addition to core reference and time series data, the API enables broader fund analytics and workflows, including:
- Fund summary and classification insights such as domicile, structure, segments, and similar funds
- Performance analytics including historical returns, snapshot returns across time horizons, and yield data
- Cost, fee, and risk metrics including expense ratios, regulatory/tax exposure, and risk measures
- Portfolio exposure and analytics including asset allocation, sector weightage, geographic exposure, and top holdings
- Trading and liquidity characteristics for evaluating tradability
- ETF-specific scoring and ratings to assess efficiency, tradability, and fit relative to benchmarks
- Distribution and income data for understanding payouts and investor returns
This TypeScript/JavaScript package is automatically generated by the OpenAPI Generator project:
- API version: 3.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 >= 18
Installation
npm
npm install @factset/sdk-utils @factset/[email protected]yarn
yarn add @factset/sdk-utils @factset/[email protected]Usage
- Generate authentication credentials.
- Setup Node.js environment
Install and activate Node.js >=18. If you're using nvm:
nvm install 18 nvm use 18(optional) Install yarn.
- Install dependencies.
- 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, PortfolioExposureAndAnalysisApi } = require('@factset/sdk-factsetfunds');
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 PortfolioExposureAndAnalysisApi();
const ids = ["MABAX-US"]; // [String] | The requested fund identifier. FactSet Identifiers, tickers, CUSIP, SEDOL, and ISIN are accepted inputs. <p>***IDs limit** = 10 per request*</p> *<p>Make note, GET Method URL request lines are also limited to a total length of 8192 bytes (8KB). In cases where the service allows for thousands of IDs, which may lead to exceeding this request line limit of 8KB, its advised for any requests with large request lines to be requested through the respective \"POST\" method.</p>*
const opts = {
'keyItemsType': new factsetfunds.KeyItemsType() // KeyItemsType | The Key Items type report.
};
// Call api endpoint
apiInstance.getFinancialKeyItems(ids, 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-factsetfunds');
const apiClient = ApiClient.instance;
apiClient.setProxyUrl('http://username:[email protected]:8080');Documentation for API Endpoints
All URIs are relative to https://api.factset.com/content/factset-funds/v3
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- factsetfunds.PortfolioExposureAndAnalysisApi | getFinancialKeyItems | GET /financials/key-items | Get Financial Key Items for Funds factsetfunds.PortfolioExposureAndAnalysisApi | getFinancialKeyItemsForList | POST /financials/key-items | Get Financial Key Items for Funds factsetfunds.PortfolioExposureAndAnalysisApi | getPortfolioAnalytics | GET /portfolio/analytics | Get Asset Allocation, Sector Weightage, Geographic Revenue and Market Capitalization details factsetfunds.PortfolioExposureAndAnalysisApi | getPortfolioAnalyticsForList | POST /portfolio/analytics | Get Asset Allocation, Sector Weightage, Geographic Revenue and Market Capitalization details factsetfunds.PortfolioExposureAndAnalysisApi | getPortfolioStatistics | GET /portfolio/statistics | Get Portfolio Statistics for Funds factsetfunds.PortfolioExposureAndAnalysisApi | getPortfolioStatisticsForList | POST /portfolio/statistics | Get Portfolio Statistics for Funds factsetfunds.PortfolioExposureAndAnalysisApi | getRiskAnalytics | GET /risk-analytics | Get Credit Risk and Rate Risk Analytics factsetfunds.PortfolioExposureAndAnalysisApi | getRiskAnalyticsForList | POST /risk-analytics | Get Credit Risk and Rate Risk Analytics. factsetfunds.PortfolioExposureAndAnalysisApi | getTop10Holdings | GET /holdings/top-10 | Get Top 10 Holdings factsetfunds.PortfolioExposureAndAnalysisApi | getTop10HoldingsForList | POST /holdings/top-10 | Get Top 10 Holdings factsetfunds.PricesReturnsAndDistributionsApi | getFundsDistributions | GET /distributions | Get Fund Distributions (Current or Historical) factsetfunds.PricesReturnsAndDistributionsApi | getFundsDistributionsForList | POST /distributions | Get Fund Distributions (Current or Historical) for a list factsetfunds.PricesReturnsAndDistributionsApi | getFundsPrices | GET /prices | Get Fund Prices (NAV) for a requested time-series factsetfunds.PricesReturnsAndDistributionsApi | getFundsPricesForList | POST /prices | Get Fund Prices (NAV) for a requested date range and large list of IDs. factsetfunds.PricesReturnsAndDistributionsApi | getFundsReturns | GET /returns | Get Fund Returns for a requested time-series factsetfunds.PricesReturnsAndDistributionsApi | getFundsReturnsForList | POST /returns | Get Fund Returns for a requested time-series and large list of IDs. factsetfunds.PricesReturnsAndDistributionsApi | getFundsReturnsRange | GET /returns/range | Get Fund Returns for a user-defined date range factsetfunds.PricesReturnsAndDistributionsApi | getFundsReturnsRangeForList | POST /returns/range | Get Fund Returns over pre-defined time horizons as of a specific date for large list of IDs. factsetfunds.PricesReturnsAndDistributionsApi | getFundsReturnsSnapshot | GET /returns/snapshot | Get Fund Returns over pre-defined time horizons as of a specific date. factsetfunds.PricesReturnsAndDistributionsApi | getFundsReturnsSnapshotForList | POST /returns/snapshot | Get Fund Returns over pre-defined time horizons as of a specific date. factsetfunds.PricesReturnsAndDistributionsApi | getFundsYield | GET /yields | Get Fund Yield for a user-defined date range for large list of IDs. factsetfunds.PricesReturnsAndDistributionsApi | getFundsYieldForList | POST /yields | Get Fund Yield for a user-defined date range for large list of IDs. factsetfunds.ScoringApi | getScoringDetails | GET /scoring | Get Scoring Details for ETFs factsetfunds.ScoringApi | getScoringForList | POST /scoring | Get Scoring Details for ETFs factsetfunds.ScreenerOperationsApi | createContentSet | POST /screener/content-sets/create | Create a new custom content set with required fields from the default content sets. factsetfunds.ScreenerOperationsApi | deleteContentSet | DELETE /screener/content-sets/{name} | Delete a custom content set. factsetfunds.ScreenerOperationsApi | getContentSets | GET /screener/content-sets | Get the content sets that are permissioned for the user. factsetfunds.ScreenerOperationsApi | getDistinctCount | POST /screener/distinct-count | Returns the number of records for a given field spread across all possible values. factsetfunds.ScreenerOperationsApi | getFields | GET /screener/fields | Get the list of fields available for given content set. factsetfunds.ScreenerOperationsApi | getScreenerData | POST /screener/search | Returns all the records that match the given criteria. factsetfunds.ScreenerOperationsApi | getStatistics | POST /screener/statistics | Returns the statistics and histogram data for a given field within the specified content sets. factsetfunds.SummarySegmentsAndStatsApi | getFundsAum | GET /aum | Get Fund AUM for a requested date range and list of IDs factsetfunds.SummarySegmentsAndStatsApi | getFundsAumForList | POST /aum | Get Fund AUM for a requested date range and large list of IDs factsetfunds.SummarySegmentsAndStatsApi | getFundsFlows | GET /flows | Get Fund Flows for a requested date range and list of IDs factsetfunds.SummarySegmentsAndStatsApi | getFundsFlowsForList | POST /flows | Get Fund Flows for a requested date range and large list of IDs factsetfunds.SummarySegmentsAndStatsApi | getFundsSummary | GET /summary | Get basic reference summary data for a Fund. factsetfunds.SummarySegmentsAndStatsApi | getFundsSummaryForList | POST /summary | Get basic reference data for a large list of Fund IDs. factsetfunds.SummarySegmentsAndStatsApi | getSegmentsAndStructure | GET /segments-and-structure | Get Fund Classification, Similar Funds, Segments, and Fund Structure factsetfunds.SummarySegmentsAndStatsApi | getSegmentsAndStructureForList | POST /segments-and-structure | Get Fund Classification, Similar Funds, Segments, and Fund Structure. factsetfunds.TaxesFeesAndRisksApi | getFundsCostsFees | GET /costs-fees | Get the Fund's Costs, Investment minimums and Risk, and Fees. factsetfunds.TaxesFeesAndRisksApi | getFundsCostsFeesForList | POST /costs-fees | Get the Fund's Costs, Investment minimums and Risk, and Fees for large list of IDs. factsetfunds.TaxesFeesAndRisksApi | getTaxesAndRisks | GET /taxes-and-risks | Get Regulatory/Tax, Tax Exposure, and Risk Measures factsetfunds.TaxesFeesAndRisksApi | getTaxesAndRisksForList | POST /taxes-and-risks | Get Regulatory/Tax, Tax Exposure, and Risk Measures. factsetfunds.TradingApi | getTrading | GET /trading | Get Trading Characteristics factsetfunds.TradingApi | getTradingForList | POST /trading | Get Trading Characteristics
Documentation for Models
- factsetfunds.AnalyticsType
- factsetfunds.AssetAllocation
- factsetfunds.AssetAllocationAllOf
- factsetfunds.AssetAllocationType
- factsetfunds.Aum
- factsetfunds.AumAllOf
- factsetfunds.AumRequest
- factsetfunds.AumRequestData
- factsetfunds.AumResponse
- factsetfunds.BenchmarkDetails
- factsetfunds.BenchmarkDetailsAllOf
- factsetfunds.BenchmarkDetailsType
- factsetfunds.Classifications
- factsetfunds.ClassificationsAllOf
- factsetfunds.ClassificationsType
- factsetfunds.ContentSet
- factsetfunds.ContentSetItem
- factsetfunds.ContentSetsResponse
- factsetfunds.CostsFees
- factsetfunds.CostsFeesAllOf
- factsetfunds.CostsFeesRequest
- factsetfunds.CostsFeesRequestData
- factsetfunds.CostsFeesResponse
- factsetfunds.CreateContentSetRequest
- factsetfunds.CreateContentSetRequestBody
- factsetfunds.CreateContentSetResponse
- factsetfunds.CreateContentSetResponseData
- factsetfunds.CreateRequestFieldObject
- factsetfunds.CreditRisk
- factsetfunds.CreditRiskAllOf
- factsetfunds.CreditRiskType
- factsetfunds.Criterion
- factsetfunds.CurrencyResponseField
- factsetfunds.CustomContentSetItem
- factsetfunds.DateResponseField
- factsetfunds.DistCurrent
- factsetfunds.DistCurrentAllOf
- factsetfunds.DistCurrentType
- factsetfunds.DistHistorical
- factsetfunds.DistHistoricalAllOf
- factsetfunds.DistHistoricalType
- factsetfunds.DistinctCountData
- factsetfunds.DistinctCountMeta
- factsetfunds.DistinctCountRequest
- factsetfunds.DistinctCountRequestBody
- factsetfunds.DistinctCountResponse
- factsetfunds.DistributionType
- factsetfunds.DistributionsItem
- factsetfunds.DistributionsRequest
- factsetfunds.DistributionsRequestItem
- factsetfunds.DistributionsResponse
- factsetfunds.DividendAdjust
- factsetfunds.ErrorResponse
- factsetfunds.Field
- factsetfunds.FieldResponseObject
- factsetfunds.FieldValues
- factsetfunds.FieldsResponse
- factsetfunds.Filter
- factsetfunds.FinancialsKeyItems
- factsetfunds.FinancialsKeyItemsRequest
- factsetfunds.FinancialsKeyItemsRequestData
- factsetfunds.FinancialsKeyItemsResponse
- factsetfunds.Flows
- factsetfunds.FlowsAllOf
- factsetfunds.FlowsRequest
- factsetfunds.FlowsRequestData
- factsetfunds.FlowsResponse
- factsetfunds.Frequency
- factsetfunds.FrequencyAum
- factsetfunds.Fund
- factsetfunds.FundStructure
- factsetfunds.FundStructureAllOf
- factsetfunds.FundStructureType
- factsetfunds.FundVsSegmentBenchmark
- factsetfunds.FundsErrorObject
- factsetfunds.FundsErrorObjectSource
- factsetfunds.FundsPricesRequest
- factsetfunds.FundsPricesRequestData
- factsetfunds.FundsPricesResponse
- factsetfunds.FundsReturnsRequest
- factsetfunds.FundsReturnsRequestData
- factsetfunds.FundsReturnsResponse
- factsetfunds.FundsReturnsSnapshotRequest
- factsetfunds.FundsReturnsSnapshotRequestData
- factsetfunds.FundsReturnsSnapshotResponse
- factsetfunds.GeographicRevenue
- factsetfunds.GeographicRevenueAllOf
- factsetfunds.GeographicRevenueType
- factsetfunds.Growth
- factsetfunds.GrowthAllOf
- factsetfunds.GrowthType
- factsetfunds.HistogramData
- factsetfunds.Holdings
- factsetfunds.IdentifierResponseFields
- factsetfunds.JoinType
- factsetfunds.KeyItemsType
- factsetfunds.Lang
- factsetfunds.Managers
- factsetfunds.Margins
- factsetfunds.MarginsAllOf
- factsetfunds.MarginsType
- factsetfunds.MarketCapitalization
- factsetfunds.MarketCapitalizationAllOf
- factsetfunds.MarketCapitalizationType
- factsetfunds.Meta
- factsetfunds.MetaPagination
- factsetfunds.MetaRequest
- factsetfunds.NavDataType
- factsetfunds.NestedFieldValueObject
- factsetfunds.NestedFieldValues
- factsetfunds.OAS
- factsetfunds.Operator
- factsetfunds.Pagination
- factsetfunds.PaginationRequest
- factsetfunds.PerShare
- factsetfunds.PerShareAllOf
- factsetfunds.PerShareType
- factsetfunds.PortfolioAnalyticsItem
- factsetfunds.PortfolioAnalyticsRequest
- factsetfunds.PortfolioAnalyticsRequestData
- factsetfunds.PortfolioAnalyticsResponse
- factsetfunds.PortfolioStatistics
- factsetfunds.PortfolioStatisticsAllOf
- factsetfunds.PortfolioStatisticsRequest
- factsetfunds.PortfolioStatisticsRequestData
- factsetfunds.PortfolioStatisticsResponse
- factsetfunds.Prices
- factsetfunds.PricesAllOf
- factsetfunds.RateRisk
- factsetfunds.RateRiskAllOf
- factsetfunds.RateRiskType
- factsetfunds.Ratios
- factsetfunds.RatiosAllOf
- factsetfunds.RatiosType
- factsetfunds.RegulationsTaxDetails
- factsetfunds.RegulationsTaxDetailsAllOf
- factsetfunds.RegulationsTaxDetailsType
- factsetfunds.Returns
- factsetfunds.ReturnsAllOf
- factsetfunds.ReturnsRange
- factsetfunds.ReturnsRangeAllOf
- factsetfunds.ReturnsRangeRequest
- factsetfunds.ReturnsRangeRequestData
- factsetfunds.ReturnsRangeResponse
- factsetfunds.ReturnsSnapshot
- factsetfunds.ReturnsSnapshotAllOf
- factsetfunds.RiskAnalyticsItem
- factsetfunds.RiskAnalyticsRequest
- factsetfunds.RiskAnalyticsRequestData
- factsetfunds.RiskAnalyticsResponse
- factsetfunds.RiskMeasures
- factsetfunds.RiskMeasuresAllOf
- factsetfunds.RiskMeasuresType
- factsetfunds.RiskType
- factsetfunds.Scoring
- factsetfunds.ScoringAllOf
- factsetfunds.ScoringRequest
- factsetfunds.ScoringRequestData
- factsetfunds.ScoringResponse
- factsetfunds.SearchCriterion
- factsetfunds.SearchData
- factsetfunds.SearchFilter
- factsetfunds.SearchMeta
- factsetfunds.SearchRequest
- factsetfunds.SearchRequestBody
- factsetfunds.SearchResponse
- factsetfunds.SectorWeightage
- factsetfunds.SectorWeightageAllOf
- factsetfunds.SectorWeightageType
- factsetfunds.SegmentsAndStructureItem
- factsetfunds.SegmentsAndStructureRequest
- factsetfunds.SegmentsAndStructureRequestData
- factsetfunds.SegmentsAndStructureResponse
- factsetfunds.SimilarFunds
- factsetfunds.SimilarFundsAllOf
- factsetfunds.SimilarFundsType
- factsetfunds.SplitAdjust
- factsetfunds.StatisticsRequest
- factsetfunds.StatisticsRequestBody
- factsetfunds.StatisticsResponse
- factsetfunds.StatisticsResponseData
- factsetfunds.StructureType
- factsetfunds.Summaries
- factsetfunds.SummariesAllOf
- factsetfunds.SummariesRequest
- factsetfunds.SummariesRequestData
- factsetfunds.SummariesResponse
- factsetfunds.TaxExposure
- factsetfunds.TaxExposureAllOf
- factsetfunds.TaxExposureType
- factsetfunds.TaxItemsType
- factsetfunds.TaxesAndRisksItem
- factsetfunds.TaxesAndRisksRequest
- factsetfunds.TaxesAndRisksRequestData
- factsetfunds.TaxesAndRisksResponse
- factsetfunds.TopHoldings
- factsetfunds.TopHoldingsAllOf
- factsetfunds.TopHoldingsRequest
- factsetfunds.TopHoldingsRequestData
- factsetfunds.TopHoldingsResponse
- factsetfunds.Trading
- factsetfunds.TradingAllOf
- factsetfunds.TradingRequest
- factsetfunds.TradingResponse
- factsetfunds.WAL
- factsetfunds.Yields
- factsetfunds.YieldsAllOf
- factsetfunds.YieldsRequest
- factsetfunds.YieldsRequestData
- factsetfunds.YieldsResponse
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 2026 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.0Unless 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.
