UNPKG

@factset/sdk-symbology

Version:

Symbology client library for JavaScript

127 lines (121 loc) 19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _ApiClient = _interopRequireDefault(require("../ApiClient")); var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse")); var _IdentifierResolutionRequest = _interopRequireDefault(require("../model/IdentifierResolutionRequest")); var _IdentifierResolutionResponse = _interopRequireDefault(require("../model/IdentifierResolutionResponse")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * FactSet Symbology API * The FactSet Symbology API provides symbol resolution services, allowing clients to translate market identifiers into various symbology types such as, FactSet Permanent Identifiers, CUSIP, ISIN, SEDOL, Tickers, and LEIs. <p>Factset's Symbology API sits at the center of its hub-and-spoke data model, enabling you to quickly harmonize the expanding catalog of Content APIs.</p><p>This API is rate-limited to 10 requests per second and 10 concurrent requests per user.</p> * * The version of the OpenAPI document: 3.5.0 * Contact: api@factset.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. * */ /** * IdentifierResolution service. * @module api/IdentifierResolutionApi */ class IdentifierResolutionApi { /** * Constructs a new IdentifierResolutionApi. * @alias module:api/IdentifierResolutionApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ constructor(apiClient) { this.apiClient = apiClient || _ApiClient.default.instance; } /** * Returns the specified output identifiers for the given input identifier. * The Identifier Resolution endpoint provides flexibility for requesting and receiving both third-party and FactSet Permanent identifiers. Users can both input and output most of the listed identifiers, with exceptions noted below. All input and output symbols must be declared, and users have the ability to resolve one input symbol to many different output symbols in one request. * **BIC*** - Bank Identification Code (e.g. ABXXHKH1) * **CIK** - Edgar Central Index Keys (e.g. 0000100331) * **CRD** - Central Registration Depository (e.g. 149722) * **EIN** - Employer Identification Number (e.g. 953540776) * **FITCH*** - Fitch Ratings Identifier (e.g. 47504) * **LEI** - Legal Entity Identifier (e.g. 549300A6K7JX8EX2QZ33) * **MD*** - Moody's Ratings Identifier (e.g. 0823736553) * **SPR*** - S&P Ratings Identifier (e.g. 301939) * **VALOREN** - Valoren (\"Valor\") Identification (e.g. 685558) (Input only) * **WKN*** - German Securities Identification (\"Wertpapierkennnummer\") (e.g. A0MU9T) * **UKCH** - UK Company House Identifier (e.g.CE012494) * **RSSD** - Federal Reserve RSSD Identifier (1139297) * **SEDOL*** * **CUSIP*** * **fsymEntityId** - FactSet entity Id * **fsymSecurityId** - FactSet security level permanent identifier * **fsymRegionalId** - FactSet regional level permanent identifier * **fsymListingId** - FactSet listing level permanent identifier * **ISIN*** * **tickerExchange** - Ticker Exchange, a marketplace where stocks, bonds, commodities, and derivatives are bought and sold. (e.g. GOOGL-NAS) * **tickerRegion** - Ticker Region, geographical region or market segment where a particular stock or security is listed and traded. (e.g. GOOGL-US) * **bloombergFigi** - Bloomberg Listing/Regional/Security Identifier (output symbols: bloombergFigiListing, bloombergFigiRegional & bloombergFigiSecurity ) (e.g. BBG009S39JY5) * **bloombergTicker** - Bloomberg Listing and Regional Ticker Identifier (output symbols: bloombergRegionalTicker & bloombergListingTicker) (e.g. GOOGL UW) * **GVKEY** - CompuStat Entity Identifier (e.g. 063172)(Input only) * **GVKEY & IID** - CompuStat Security Identifier (e.g.063172001) (Input only) * **JCN** - Japan Corporate Number (e.g. 9011101021173) * **LoanX** - Markit Bank Loan Security Identifier (e.g. LX130668) (Input only) * **MarkitRed** - Markit Entity Identifier (e.g. 3D337C) (Input only) * **VAT** - VAT Number (e.g. FR32329211734) * **crunchBaseId** - Crunchbase Identifier (e.g. 540cb687-1d56-4f0b-9a2a-0b7d22303bd1) * **creditSafeId** - CreditSafe Identifier (e.g. JP002181442) **These symbol types require additional subscriptions. If you would like to gain access to these symbol types, please contact your FactSet Account Team or \"Report Issue\" above and our support teams can assist.* * @param {module:model/IdentifierResolutionRequest} identifierResolutionRequest Request Body for Identifier Resolution. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/IdentifierResolutionResponse} and HTTP response */ batchIdentifierResolutionWithHttpInfo(identifierResolutionRequest) { let postBody = identifierResolutionRequest; // verify the required parameter 'identifierResolutionRequest' is set if (identifierResolutionRequest === undefined || identifierResolutionRequest === null) { throw new Error("Missing the required parameter 'identifierResolutionRequest' when calling batchIdentifierResolution"); } let pathParams = {}; let queryParams = {}; let headerParams = {}; let formParams = {}; let authNames = ['FactSetApiKey', 'FactSetOAuth2']; let contentTypes = ['application/json']; let accepts = ['application/json']; let returnType = _IdentifierResolutionResponse.default; return this.apiClient.callApi('/symbology/v3/identifier-resolution', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); } /** * Returns the specified output identifiers for the given input identifier. * The Identifier Resolution endpoint provides flexibility for requesting and receiving both third-party and FactSet Permanent identifiers. Users can both input and output most of the listed identifiers, with exceptions noted below. All input and output symbols must be declared, and users have the ability to resolve one input symbol to many different output symbols in one request. * **BIC*** - Bank Identification Code (e.g. ABXXHKH1) * **CIK** - Edgar Central Index Keys (e.g. 0000100331) * **CRD** - Central Registration Depository (e.g. 149722) * **EIN** - Employer Identification Number (e.g. 953540776) * **FITCH*** - Fitch Ratings Identifier (e.g. 47504) * **LEI** - Legal Entity Identifier (e.g. 549300A6K7JX8EX2QZ33) * **MD*** - Moody's Ratings Identifier (e.g. 0823736553) * **SPR*** - S&P Ratings Identifier (e.g. 301939) * **VALOREN** - Valoren (\"Valor\") Identification (e.g. 685558) (Input only) * **WKN*** - German Securities Identification (\"Wertpapierkennnummer\") (e.g. A0MU9T) * **UKCH** - UK Company House Identifier (e.g.CE012494) * **RSSD** - Federal Reserve RSSD Identifier (1139297) * **SEDOL*** * **CUSIP*** * **fsymEntityId** - FactSet entity Id * **fsymSecurityId** - FactSet security level permanent identifier * **fsymRegionalId** - FactSet regional level permanent identifier * **fsymListingId** - FactSet listing level permanent identifier * **ISIN*** * **tickerExchange** - Ticker Exchange, a marketplace where stocks, bonds, commodities, and derivatives are bought and sold. (e.g. GOOGL-NAS) * **tickerRegion** - Ticker Region, geographical region or market segment where a particular stock or security is listed and traded. (e.g. GOOGL-US) * **bloombergFigi** - Bloomberg Listing/Regional/Security Identifier (output symbols: bloombergFigiListing, bloombergFigiRegional & bloombergFigiSecurity ) (e.g. BBG009S39JY5) * **bloombergTicker** - Bloomberg Listing and Regional Ticker Identifier (output symbols: bloombergRegionalTicker & bloombergListingTicker) (e.g. GOOGL UW) * **GVKEY** - CompuStat Entity Identifier (e.g. 063172)(Input only) * **GVKEY & IID** - CompuStat Security Identifier (e.g.063172001) (Input only) * **JCN** - Japan Corporate Number (e.g. 9011101021173) * **LoanX** - Markit Bank Loan Security Identifier (e.g. LX130668) (Input only) * **MarkitRed** - Markit Entity Identifier (e.g. 3D337C) (Input only) * **VAT** - VAT Number (e.g. FR32329211734) * **crunchBaseId** - Crunchbase Identifier (e.g. 540cb687-1d56-4f0b-9a2a-0b7d22303bd1) * **creditSafeId** - CreditSafe Identifier (e.g. JP002181442) **These symbol types require additional subscriptions. If you would like to gain access to these symbol types, please contact your FactSet Account Team or \"Report Issue\" above and our support teams can assist.* * @param {module:model/IdentifierResolutionRequest} identifierResolutionRequest Request Body for Identifier Resolution. * @return { Promise.< module:model/IdentifierResolutionResponse > } a Promise, with data of type {@link module:model/IdentifierResolutionResponse } */ batchIdentifierResolution(identifierResolutionRequest) { return this.batchIdentifierResolutionWithHttpInfo(identifierResolutionRequest).then(function (response_and_data) { return response_and_data.data; }); } /** * Returns the specified output identifiers for the specified input identifier. * The Identifier Resolution endpoint provides flexibility for requesting and receiving both third-party and FactSet Permanent identifiers. Users can both input and output most of the listed identifiers, with exceptions noted below. All input and output symbols must be declared, and users have the ability to resolve one input symbol to many different output symbols in one request. * **BIC*** - Bank Identification Code (e.g. ABXXHKH1) * **CIK** - Edgar Central Index Keys (e.g. 0000100331) * **CRD** - Central Registration Depository (e.g. 149722) * **EIN** - Employer Identification Number (e.g. 953540776) * **FITCH*** - Fitch Ratings Identifier (e.g. 47504) * **LEI** - Legal Entity Identifier (e.g. 549300A6K7JX8EX2QZ33) * **MD*** - Moody's Ratings Identifier (e.g. 0823736553) * **SPR*** - S&P Ratings Identifier (e.g. 301939) * **VALOREN** - Valoren (\"Valor\") Identification (e.g. 685558) (Input only) * **WKN*** - German Securities Identification (\"Wertpapierkennnummer\") (e.g. A0MU9T) * **UKCH** - UK Company House Identifier (e.g.CE012494) * **RSSD** - Federal Reserve RSSD Identifier (1139297) * **SEDOL*** * **CUSIP*** * **fsymEntityId** - FactSet entity Id * **fsymSecurityId** - FactSet security level permanent identifier * **fsymRegionalId** - FactSet regional level permanent identifier * **fsymListingId** - FactSet listing level permanent identifier * **ISIN*** * **tickerExchange** - Ticker Exchange is a marketplace where stocks, bonds, commodities, and derivatives are bought and sold. (e.g. GOOGL-NAS) * **tickerRegion** - Ticker Region is the geographical region or market segment where a particular stock or security is listed and traded. (e.g. GOOGL-US) * **bloombergFigi** - Bloomberg Listing/Regional/Security Identifier (output symbols: bloombergFigiListing, bloombergFigiRegional & bloombergFigiSecurity) (e.g. BBG009S39JY5) * **bloombergTicker** - Bloomberg Listing/Regional/Security Identifier (output symbols: bloombergTickerListing, bloombergTickerRegional & bloombergTickerSecurity) (e.g. GOOGL UW) * **GVKEY** - CompuStat Entity Identifier (e.g. 063172)(Input only) * **GVKEY & IID** - CompuStat Security Identifier (e.g.063172001) (Input only) * **JCN** - Japan Corporate Number (e.g. 9011101021173) * **LoanX** - Markit Bank Loan Security Identifier (e.g. LX130668) (Input only) * **MarkitRed** - Markit Entity Identifier (e.g. 3D337C) (Input only) * **VAT** - VAT Number (e.g. FR32329211734) * **crunchBaseId** - Crunchbase Identifier (e.g. 540cb687-1d56-4f0b-9a2a-0b7d22303bd1) * **creditSafeId** - CreditSafe Identifier (e.g. JP002181442) **These symbol types require additional subscriptions. If you would like to gain access to these symbol types, please contact your FactSet Account Team or \"Report Issue\" above and our support teams can assist.* * @param {Array.<String>} ids Requested security or entity identifiers. All requested identifiers must be of the same type. This request value is sent back in the response as, `requestId'. <p>***ids limit** = 100 per request*</p> *<p>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>* * @param {module:model/String} inputSymbolType The type of symbol being inputted. Only one type of symbol is accepted with each request. * @param {Array.<module:model/String>} outputSymbolTypes The type of symbols being outputted. Multiple types of symbols can be outputted with each request. The user must be authorized for the requested identifier type. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/IdentifierResolutionResponse} and HTTP response */ identifierResolutionWithHttpInfo(ids, inputSymbolType, outputSymbolTypes) { let postBody = null; // verify the required parameter 'ids' is set if (ids === undefined || ids === null) { throw new Error("Missing the required parameter 'ids' when calling identifierResolution"); } // verify the required parameter 'inputSymbolType' is set if (inputSymbolType === undefined || inputSymbolType === null) { throw new Error("Missing the required parameter 'inputSymbolType' when calling identifierResolution"); } // verify the required parameter 'outputSymbolTypes' is set if (outputSymbolTypes === undefined || outputSymbolTypes === null) { throw new Error("Missing the required parameter 'outputSymbolTypes' when calling identifierResolution"); } let pathParams = {}; let queryParams = { 'ids': this.apiClient.buildCollectionParam(ids, 'csv'), 'inputSymbolType': inputSymbolType, 'outputSymbolTypes': this.apiClient.buildCollectionParam(outputSymbolTypes, 'csv') }; let headerParams = {}; let formParams = {}; let authNames = ['FactSetApiKey', 'FactSetOAuth2']; let contentTypes = []; let accepts = ['application/json']; let returnType = _IdentifierResolutionResponse.default; return this.apiClient.callApi('/symbology/v3/identifier-resolution', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); } /** * Returns the specified output identifiers for the specified input identifier. * The Identifier Resolution endpoint provides flexibility for requesting and receiving both third-party and FactSet Permanent identifiers. Users can both input and output most of the listed identifiers, with exceptions noted below. All input and output symbols must be declared, and users have the ability to resolve one input symbol to many different output symbols in one request. * **BIC*** - Bank Identification Code (e.g. ABXXHKH1) * **CIK** - Edgar Central Index Keys (e.g. 0000100331) * **CRD** - Central Registration Depository (e.g. 149722) * **EIN** - Employer Identification Number (e.g. 953540776) * **FITCH*** - Fitch Ratings Identifier (e.g. 47504) * **LEI** - Legal Entity Identifier (e.g. 549300A6K7JX8EX2QZ33) * **MD*** - Moody's Ratings Identifier (e.g. 0823736553) * **SPR*** - S&P Ratings Identifier (e.g. 301939) * **VALOREN** - Valoren (\"Valor\") Identification (e.g. 685558) (Input only) * **WKN*** - German Securities Identification (\"Wertpapierkennnummer\") (e.g. A0MU9T) * **UKCH** - UK Company House Identifier (e.g.CE012494) * **RSSD** - Federal Reserve RSSD Identifier (1139297) * **SEDOL*** * **CUSIP*** * **fsymEntityId** - FactSet entity Id * **fsymSecurityId** - FactSet security level permanent identifier * **fsymRegionalId** - FactSet regional level permanent identifier * **fsymListingId** - FactSet listing level permanent identifier * **ISIN*** * **tickerExchange** - Ticker Exchange is a marketplace where stocks, bonds, commodities, and derivatives are bought and sold. (e.g. GOOGL-NAS) * **tickerRegion** - Ticker Region is the geographical region or market segment where a particular stock or security is listed and traded. (e.g. GOOGL-US) * **bloombergFigi** - Bloomberg Listing/Regional/Security Identifier (output symbols: bloombergFigiListing, bloombergFigiRegional & bloombergFigiSecurity) (e.g. BBG009S39JY5) * **bloombergTicker** - Bloomberg Listing/Regional/Security Identifier (output symbols: bloombergTickerListing, bloombergTickerRegional & bloombergTickerSecurity) (e.g. GOOGL UW) * **GVKEY** - CompuStat Entity Identifier (e.g. 063172)(Input only) * **GVKEY & IID** - CompuStat Security Identifier (e.g.063172001) (Input only) * **JCN** - Japan Corporate Number (e.g. 9011101021173) * **LoanX** - Markit Bank Loan Security Identifier (e.g. LX130668) (Input only) * **MarkitRed** - Markit Entity Identifier (e.g. 3D337C) (Input only) * **VAT** - VAT Number (e.g. FR32329211734) * **crunchBaseId** - Crunchbase Identifier (e.g. 540cb687-1d56-4f0b-9a2a-0b7d22303bd1) * **creditSafeId** - CreditSafe Identifier (e.g. JP002181442) **These symbol types require additional subscriptions. If you would like to gain access to these symbol types, please contact your FactSet Account Team or \"Report Issue\" above and our support teams can assist.* * @param {Array.<String>} ids Requested security or entity identifiers. All requested identifiers must be of the same type. This request value is sent back in the response as, `requestId'. <p>***ids limit** = 100 per request*</p> *<p>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>* * @param {module:model/String} inputSymbolType The type of symbol being inputted. Only one type of symbol is accepted with each request. * @param {Array.<module:model/String>} outputSymbolTypes The type of symbols being outputted. Multiple types of symbols can be outputted with each request. The user must be authorized for the requested identifier type. * @return { Promise.< module:model/IdentifierResolutionResponse > } a Promise, with data of type {@link module:model/IdentifierResolutionResponse } */ identifierResolution(ids, inputSymbolType, outputSymbolTypes) { return this.identifierResolutionWithHttpInfo(ids, inputSymbolType, outputSymbolTypes).then(function (response_and_data) { return response_and_data.data; }); } } exports.default = IdentifierResolutionApi;