@factset/sdk-symbology
Version:
Symbology client library for JavaScript
133 lines (127 loc) • 20.4 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
var _ErrorResponseHistorical = _interopRequireDefault(require("../model/ErrorResponseHistorical"));
var _IdentifierResolutionHistoricalRequest = _interopRequireDefault(require("../model/IdentifierResolutionHistoricalRequest"));
var _IdentifierResolutionHistoricalResponse = _interopRequireDefault(require("../model/IdentifierResolutionHistoricalResponse"));
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.4.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.
*
*/
/**
* HistoricalIdentifierResolution service.
* @module api/HistoricalIdentifierResolutionApi
*/
class HistoricalIdentifierResolutionApi {
/**
* Constructs a new HistoricalIdentifierResolutionApi.
* @alias module:api/HistoricalIdentifierResolutionApi
* @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 historical output identifiers for the given input identifier.
* This endpoint enables the retrieval of historical CUSIP, SEDOL, ISIN, and tickerRegion identifiers. Users can input any of the listed identifiers and resolve one input symbol to multiple different output symbols in a single request. Both input and output symbols must be declared. The `asOfDate` field allows users to retrieve the full history of an identifier or the specific identifiers as of the requested date. * **BIC*** - Bank Identification Code (e.g. ABXXHKH1) (Input only) * **CIK** - Edgar Central Index Keys (e.g. 0000100331) (Input only) * **CRD** - Central Registration Depository (e.g. 149722) (Input only) * **EIN** - Employer Identification Number (e.g. 953540776) (Input only) * **FITCH*** - Fitch Ratings Identifier (e.g. 47504) (Input only) * **LEI** - Legal Entity Identifier (e.g. 549300A6K7JX8EX2QZ33) (Input only) * **MD*** - Moody's Ratings Identifier (e.g. 0823736553) (Input only) * **SPR*** - S&P Ratings Identifier (e.g. 301939) (Input only) * **VALOREN** - Valoren (\"Valor\") Identification (e.g. 685558) (Input only) * **WKN*** - German Securities Identification (\"Wertpapierkennnummer\") (e.g. A0MU9T) (Input only) * **UKCH** - UK Company House Identifier (e.g.CE012494) (Input only) * **RSSD** - Federal Reserve RSSD Identifier (1139297) (Input only) * **SEDOL*** * **CUSIP*** * **fsymEntityId** - FactSet entity Id (Input only) * **fsymSecurityId** - FactSet security level permanent identifier (Input only) * **fsymRegionalId** - FactSet regional level permanent identifier (Input only) * **fsymListingId** - FactSet listing level permanent identifier (Input only) * **ISIN*** * **tickerExchange** - Ticker Exchange, a marketplace where stocks, bonds, commodities, and derivatives are bought and sold. (e.g. GOOGL-NAS) (Input only) * **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) (Input only) * **bloombergTicker** - Bloomberg Listing and Regional Ticker Identifier (output symbols: bloombergRegionalTicker & bloombergListingTicker) (e.g. GOOGL UW) (Input only) * **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) (Input only) * **LoanX** - Markit Bank Loan Security Identifier (e.g. LX130668) (Input only) * **MarkitRed** - Markit Entity Identifier (e.g. 3D337C) (Input only) **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/IdentifierResolutionHistoricalRequest} identifierResolutionHistoricalRequest Request Body for Historical Identifier Resolution.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/IdentifierResolutionHistoricalResponse} and HTTP response
*/
batchHistoricalIdentifierResolutionWithHttpInfo(identifierResolutionHistoricalRequest) {
let postBody = identifierResolutionHistoricalRequest;
// verify the required parameter 'identifierResolutionHistoricalRequest' is set
if (identifierResolutionHistoricalRequest === undefined || identifierResolutionHistoricalRequest === null) {
throw new Error("Missing the required parameter 'identifierResolutionHistoricalRequest' when calling batchHistoricalIdentifierResolution");
}
let pathParams = {};
let queryParams = {};
let headerParams = {};
let formParams = {};
let authNames = ['FactSetApiKey', 'FactSetOAuth2'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = _IdentifierResolutionHistoricalResponse.default;
return this.apiClient.callApi('/symbology/v3/historical-identifier-resolution', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
}
/**
* Returns the specified historical output identifiers for the given input identifier.
* This endpoint enables the retrieval of historical CUSIP, SEDOL, ISIN, and tickerRegion identifiers. Users can input any of the listed identifiers and resolve one input symbol to multiple different output symbols in a single request. Both input and output symbols must be declared. The `asOfDate` field allows users to retrieve the full history of an identifier or the specific identifiers as of the requested date. * **BIC*** - Bank Identification Code (e.g. ABXXHKH1) (Input only) * **CIK** - Edgar Central Index Keys (e.g. 0000100331) (Input only) * **CRD** - Central Registration Depository (e.g. 149722) (Input only) * **EIN** - Employer Identification Number (e.g. 953540776) (Input only) * **FITCH*** - Fitch Ratings Identifier (e.g. 47504) (Input only) * **LEI** - Legal Entity Identifier (e.g. 549300A6K7JX8EX2QZ33) (Input only) * **MD*** - Moody's Ratings Identifier (e.g. 0823736553) (Input only) * **SPR*** - S&P Ratings Identifier (e.g. 301939) (Input only) * **VALOREN** - Valoren (\"Valor\") Identification (e.g. 685558) (Input only) * **WKN*** - German Securities Identification (\"Wertpapierkennnummer\") (e.g. A0MU9T) (Input only) * **UKCH** - UK Company House Identifier (e.g.CE012494) (Input only) * **RSSD** - Federal Reserve RSSD Identifier (1139297) (Input only) * **SEDOL*** * **CUSIP*** * **fsymEntityId** - FactSet entity Id (Input only) * **fsymSecurityId** - FactSet security level permanent identifier (Input only) * **fsymRegionalId** - FactSet regional level permanent identifier (Input only) * **fsymListingId** - FactSet listing level permanent identifier (Input only) * **ISIN*** * **tickerExchange** - Ticker Exchange, a marketplace where stocks, bonds, commodities, and derivatives are bought and sold. (e.g. GOOGL-NAS) (Input only) * **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) (Input only) * **bloombergTicker** - Bloomberg Listing and Regional Ticker Identifier (output symbols: bloombergRegionalTicker & bloombergListingTicker) (e.g. GOOGL UW) (Input only) * **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) (Input only) * **LoanX** - Markit Bank Loan Security Identifier (e.g. LX130668) (Input only) * **MarkitRed** - Markit Entity Identifier (e.g. 3D337C) (Input only) **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/IdentifierResolutionHistoricalRequest} identifierResolutionHistoricalRequest Request Body for Historical Identifier Resolution.
* @return { Promise.< module:model/IdentifierResolutionHistoricalResponse > } a Promise, with data of type {@link module:model/IdentifierResolutionHistoricalResponse }
*/
batchHistoricalIdentifierResolution(identifierResolutionHistoricalRequest) {
return this.batchHistoricalIdentifierResolutionWithHttpInfo(identifierResolutionHistoricalRequest).then(function (response_and_data) {
return response_and_data.data;
});
}
/**
* Returns the specified historical output identifiers for the given input identifier.
* This endpoint enables the retrieval of historical CUSIP, SEDOL, ISIN, and tickerRegion identifiers. Users can input any of the listed identifiers and resolve one input symbol to multiple different output symbols in a single request. Both input and output symbols must be declared. The `asOfDate` field allows users to retrieve the full history of an identifier or the specific identifiers as of the requested date. * **BIC*** - Bank Identification Code (e.g. ABXXHKH1) (Input only) * **CIK** - Edgar Central Index Keys (e.g. 0000100331) (Input only) * **CRD** - Central Registration Depository (e.g. 149722) (Input only) * **EIN** - Employer Identification Number (e.g. 953540776) (Input only) * **FITCH*** - Fitch Ratings Identifier (e.g. 47504) (Input only) * **LEI** - Legal Entity Identifier (e.g. 549300A6K7JX8EX2QZ33) (Input only) * **MD*** - Moody's Ratings Identifier (e.g. 0823736553) (Input only) * **SPR*** - S&P Ratings Identifier (e.g. 301939) (Input only) * **VALOREN** - Valoren (\"Valor\") Identification (e.g. 685558) (Input only) * **WKN*** - German Securities Identification (\"Wertpapierkennnummer\") (e.g. A0MU9T) (Input only) * **UKCH** - UK Company House Identifier (e.g.CE012494) (Input only) * **RSSD** - Federal Reserve RSSD Identifier (1139297) (Input only) * **SEDOL*** * **CUSIP*** * **fsymEntityId** - FactSet entity Id (Input only) * **fsymSecurityId** - FactSet security level permanent identifier (Input only) * **fsymRegionalId** - FactSet regional level permanent identifier (Input only) * **fsymListingId** - FactSet listing level permanent identifier (Input only) * **ISIN*** * **tickerExchange** - Ticker Exchange is a marketplace where stocks, bonds, commodities, and derivatives are bought and sold. (e.g. GOOGL-NAS) (Input only) * **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) (Input only) * **bloombergTicker** - Bloomberg Listing and Regional Ticker Identifier (output symbols: bloombergRegionalTicker & bloombergListingTicker) (e.g. GOOGL UW) (Input only) * **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) (Input only) * **LoanX** - Markit Bank Loan Security Identifier (e.g. LX130668) (Input only) * **MarkitRed** - Markit Entity Identifier (e.g. 3D337C) (Input only) **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.
* @param {Object} opts Optional parameters
* @param {Date} opts.asOfDate As of date for historical symbol request in YYYY-MM-DD format. If no `asOfDate` is requested, the response will include the full history of the identifier.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/IdentifierResolutionHistoricalResponse} and HTTP response
*/
historicalIdentifierResolutionWithHttpInfo(ids, inputSymbolType, outputSymbolTypes, opts) {
opts = opts || {};
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 historicalIdentifierResolution");
}
// verify the required parameter 'inputSymbolType' is set
if (inputSymbolType === undefined || inputSymbolType === null) {
throw new Error("Missing the required parameter 'inputSymbolType' when calling historicalIdentifierResolution");
}
// verify the required parameter 'outputSymbolTypes' is set
if (outputSymbolTypes === undefined || outputSymbolTypes === null) {
throw new Error("Missing the required parameter 'outputSymbolTypes' when calling historicalIdentifierResolution");
}
let pathParams = {};
let queryParams = {
'ids': this.apiClient.buildCollectionParam(ids, 'csv'),
'inputSymbolType': inputSymbolType,
'outputSymbolTypes': this.apiClient.buildCollectionParam(outputSymbolTypes, 'csv'),
'asOfDate': opts['asOfDate']
};
let headerParams = {};
let formParams = {};
let authNames = ['FactSetApiKey', 'FactSetOAuth2'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = _IdentifierResolutionHistoricalResponse.default;
return this.apiClient.callApi('/symbology/v3/historical-identifier-resolution', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
}
/**
* Returns the specified historical output identifiers for the given input identifier.
* This endpoint enables the retrieval of historical CUSIP, SEDOL, ISIN, and tickerRegion identifiers. Users can input any of the listed identifiers and resolve one input symbol to multiple different output symbols in a single request. Both input and output symbols must be declared. The `asOfDate` field allows users to retrieve the full history of an identifier or the specific identifiers as of the requested date. * **BIC*** - Bank Identification Code (e.g. ABXXHKH1) (Input only) * **CIK** - Edgar Central Index Keys (e.g. 0000100331) (Input only) * **CRD** - Central Registration Depository (e.g. 149722) (Input only) * **EIN** - Employer Identification Number (e.g. 953540776) (Input only) * **FITCH*** - Fitch Ratings Identifier (e.g. 47504) (Input only) * **LEI** - Legal Entity Identifier (e.g. 549300A6K7JX8EX2QZ33) (Input only) * **MD*** - Moody's Ratings Identifier (e.g. 0823736553) (Input only) * **SPR*** - S&P Ratings Identifier (e.g. 301939) (Input only) * **VALOREN** - Valoren (\"Valor\") Identification (e.g. 685558) (Input only) * **WKN*** - German Securities Identification (\"Wertpapierkennnummer\") (e.g. A0MU9T) (Input only) * **UKCH** - UK Company House Identifier (e.g.CE012494) (Input only) * **RSSD** - Federal Reserve RSSD Identifier (1139297) (Input only) * **SEDOL*** * **CUSIP*** * **fsymEntityId** - FactSet entity Id (Input only) * **fsymSecurityId** - FactSet security level permanent identifier (Input only) * **fsymRegionalId** - FactSet regional level permanent identifier (Input only) * **fsymListingId** - FactSet listing level permanent identifier (Input only) * **ISIN*** * **tickerExchange** - Ticker Exchange is a marketplace where stocks, bonds, commodities, and derivatives are bought and sold. (e.g. GOOGL-NAS) (Input only) * **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) (Input only) * **bloombergTicker** - Bloomberg Listing and Regional Ticker Identifier (output symbols: bloombergRegionalTicker & bloombergListingTicker) (e.g. GOOGL UW) (Input only) * **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) (Input only) * **LoanX** - Markit Bank Loan Security Identifier (e.g. LX130668) (Input only) * **MarkitRed** - Markit Entity Identifier (e.g. 3D337C) (Input only) **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.
* @param {Object} opts Optional parameters
* @param {Date} opts.asOfDate As of date for historical symbol request in YYYY-MM-DD format. If no `asOfDate` is requested, the response will include the full history of the identifier.
* @return { Promise.< module:model/IdentifierResolutionHistoricalResponse > } a Promise, with data of type {@link module:model/IdentifierResolutionHistoricalResponse }
*/
historicalIdentifierResolution(ids, inputSymbolType, outputSymbolTypes, opts) {
return this.historicalIdentifierResolutionWithHttpInfo(ids, inputSymbolType, outputSymbolTypes, opts).then(function (response_and_data) {
return response_and_data.data;
});
}
}
exports.default = HistoricalIdentifierResolutionApi;