@factset/sdk-factsetglobalprices
Version:
FactSet Global Prices client library for JavaScript
466 lines (448 loc) • 42.9 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
var _CorporateActionsResponseCalendar = _interopRequireDefault(require("../model/CorporateActionsResponseCalendar"));
var _DividendsResponse = _interopRequireDefault(require("../model/DividendsResponse"));
var _ErrorResponseCalendar = _interopRequireDefault(require("../model/ErrorResponseCalendar"));
var _EventCountResponse = _interopRequireDefault(require("../model/EventCountResponse"));
var _ExchangesResponse = _interopRequireDefault(require("../model/ExchangesResponse"));
var _RightsIssuesResponse = _interopRequireDefault(require("../model/RightsIssuesResponse"));
var _SpinOffsResponse = _interopRequireDefault(require("../model/SpinOffsResponse"));
var _SplitsResponseCalendar = _interopRequireDefault(require("../model/SplitsResponseCalendar"));
var _StockDistributionsResponseCalendar = _interopRequireDefault(require("../model/StockDistributionsResponseCalendar"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
* FactSet Global Prices API
* The FactSet Global Prices API provides end of day market pricing content using cloud and microservices technology, encompassing both pricing as well as corporate actions and events data.</p>
*
* The version of the OpenAPI document: 1.11.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.
*
*/
/**
* CorporateActionsForCalendar service.
* @module api/CorporateActionsForCalendarApi
*/
class CorporateActionsForCalendarApi {
/**
* Constructs a new CorporateActionsForCalendarApi.
* @alias module:api/CorporateActionsForCalendarApi
* @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;
}
/**
* Retrieve Event Calendar information for Corporate Actions
* Gives an overview of all available Corporate Actions over a specified date range.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<module:model/String>} opts.eventCategories Select one or more Event Categories from the dropdown: - **CASH_DIVS:** Includes Dividends(DVC), Dividend with DRP Option(DVCD), Dividend Reinvestment(DRP) - **STOCK_DIST:** Includes Stock Dividend(DVS), Stock Dividend - Special(DVSS), Bonus(BNS), Bonus - Special(BNSS) - **SPINOFFS:** Includes Spin Off(SPO) - **RIGHTS:** Includes Rights Issue(DSR) - **SPLITS:** Includes Forward Split(FSP), Reverse Split(RSP), Split(SPL), Exchange Of Securities(EXOS) If omitted, the data is returned for all the available eventCategories.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `eventDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CorporateActionsResponseCalendar} and HTTP response
*/
getCorporateActionsWithHttpInfo(opts) {
opts = opts || {};
let postBody = null;
let pathParams = {};
let queryParams = {
'ids': this.apiClient.buildCollectionParam(opts['ids'], 'csv'),
'startDate': opts['startDate'],
'endDate': opts['endDate'],
'eventCategories': this.apiClient.buildCollectionParam(opts['eventCategories'], 'csv'),
'exchanges': this.apiClient.buildCollectionParam(opts['exchanges'], 'csv'),
'_sort': this.apiClient.buildCollectionParam(opts['sort'], 'csv'),
'_paginationLimit': opts['paginationLimit'],
'_paginationOffset': opts['paginationOffset']
};
let headerParams = {};
let formParams = {};
let authNames = ['FactSetApiKey', 'FactSetOAuth2'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = _CorporateActionsResponseCalendar.default;
return this.apiClient.callApi('/factset-global-prices/v1/calendar/corporate-actions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
}
/**
* Retrieve Event Calendar information for Corporate Actions
* Gives an overview of all available Corporate Actions over a specified date range.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<module:model/String>} opts.eventCategories Select one or more Event Categories from the dropdown: - **CASH_DIVS:** Includes Dividends(DVC), Dividend with DRP Option(DVCD), Dividend Reinvestment(DRP) - **STOCK_DIST:** Includes Stock Dividend(DVS), Stock Dividend - Special(DVSS), Bonus(BNS), Bonus - Special(BNSS) - **SPINOFFS:** Includes Spin Off(SPO) - **RIGHTS:** Includes Rights Issue(DSR) - **SPLITS:** Includes Forward Split(FSP), Reverse Split(RSP), Split(SPL), Exchange Of Securities(EXOS) If omitted, the data is returned for all the available eventCategories.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `eventDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return { Promise.< module:model/CorporateActionsResponseCalendar > } a Promise, with data of type {@link module:model/CorporateActionsResponseCalendar }
*/
getCorporateActions(opts) {
return this.getCorporateActionsWithHttpInfo(opts).then(function (response_and_data) {
return response_and_data.data;
});
}
/**
* Retrieve Dividend information
* Retrieves detailed dividend information including amounts, relevant dates, and other specifics for Dividends, Dividends with DRP Option, and Dividend Reinvestment events within the specified date range. To retrieve details of a given event for a company on a specific exchange, please pass both the eventId and the company identifier. Note that passing eventId or (`eventId` + `ids`) will cause the end point to ignore the other parameters. Passing values for any other combination of the parameters (`ids`, `startDate`, `endDate` and `exchanges`) will lead to an AND operation for all the parameters passed.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.eventIds FactSet Event Identifier - a unique identifier for an event across multiple exchanges. If provided, the API will return data for the specified event.
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `effectiveDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DividendsResponse} and HTTP response
*/
getDividendsWithHttpInfo(opts) {
opts = opts || {};
let postBody = null;
let pathParams = {};
let queryParams = {
'eventIds': this.apiClient.buildCollectionParam(opts['eventIds'], 'csv'),
'ids': this.apiClient.buildCollectionParam(opts['ids'], 'csv'),
'startDate': opts['startDate'],
'endDate': opts['endDate'],
'exchanges': this.apiClient.buildCollectionParam(opts['exchanges'], 'csv'),
'_sort': this.apiClient.buildCollectionParam(opts['sort'], 'csv'),
'_paginationLimit': opts['paginationLimit'],
'_paginationOffset': opts['paginationOffset']
};
let headerParams = {};
let formParams = {};
let authNames = ['FactSetApiKey', 'FactSetOAuth2'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = _DividendsResponse.default;
return this.apiClient.callApi('/factset-global-prices/v1/calendar/dividends', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
}
/**
* Retrieve Dividend information
* Retrieves detailed dividend information including amounts, relevant dates, and other specifics for Dividends, Dividends with DRP Option, and Dividend Reinvestment events within the specified date range. To retrieve details of a given event for a company on a specific exchange, please pass both the eventId and the company identifier. Note that passing eventId or (`eventId` + `ids`) will cause the end point to ignore the other parameters. Passing values for any other combination of the parameters (`ids`, `startDate`, `endDate` and `exchanges`) will lead to an AND operation for all the parameters passed.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.eventIds FactSet Event Identifier - a unique identifier for an event across multiple exchanges. If provided, the API will return data for the specified event.
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `effectiveDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return { Promise.< module:model/DividendsResponse > } a Promise, with data of type {@link module:model/DividendsResponse }
*/
getDividends(opts) {
return this.getDividendsWithHttpInfo(opts).then(function (response_and_data) {
return response_and_data.data;
});
}
/**
* Retrieve daily event count for a given date range
* Returns the overall count of various events for each day within the specified date range.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `eventDate`.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EventCountResponse} and HTTP response
*/
getEventCountWithHttpInfo(opts) {
opts = opts || {};
let postBody = null;
let pathParams = {};
let queryParams = {
'ids': this.apiClient.buildCollectionParam(opts['ids'], 'csv'),
'startDate': opts['startDate'],
'endDate': opts['endDate'],
'exchanges': this.apiClient.buildCollectionParam(opts['exchanges'], 'csv'),
'_sort': this.apiClient.buildCollectionParam(opts['sort'], 'csv')
};
let headerParams = {};
let formParams = {};
let authNames = ['FactSetApiKey', 'FactSetOAuth2'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = _EventCountResponse.default;
return this.apiClient.callApi('/factset-global-prices/v1/calendar/event-count', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
}
/**
* Retrieve daily event count for a given date range
* Returns the overall count of various events for each day within the specified date range.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `eventDate`.
* @return { Promise.< module:model/EventCountResponse > } a Promise, with data of type {@link module:model/EventCountResponse }
*/
getEventCount(opts) {
return this.getEventCountWithHttpInfo(opts).then(function (response_and_data) {
return response_and_data.data;
});
}
/**
* Returns a list of exchanges for which event/action data is available.
* Returns a list of available values for the exchanges parameter.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ExchangesResponse} and HTTP response
*/
getExchangesWithHttpInfo() {
let postBody = null;
let pathParams = {};
let queryParams = {};
let headerParams = {};
let formParams = {};
let authNames = ['FactSetApiKey', 'FactSetOAuth2'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = _ExchangesResponse.default;
return this.apiClient.callApi('/factset-global-prices/v1/calendar/meta/exchanges', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
}
/**
* Returns a list of exchanges for which event/action data is available.
* Returns a list of available values for the exchanges parameter.
* @return { Promise.< module:model/ExchangesResponse > } a Promise, with data of type {@link module:model/ExchangesResponse }
*/
getExchanges() {
return this.getExchangesWithHttpInfo().then(function (response_and_data) {
return response_and_data.data;
});
}
/**
* Retrieve Rights Issue information
* Retrieves the prices, relevant dates, and other specifics over a specified date range for Rights Issue events. To retrieve details of a given event for a company on a specific exchange, please pass both the eventId and the company identifier. Note that passing eventId or (`eventId` + `ids`) will cause the end point to ignore the other parameters. Passing values for any other combination of the parameters (`ids`, `startDate`, `endDate` and `exchanges`) will lead to an AND operation for all the parameters passed.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.eventIds FactSet Event Identifier - a unique identifier for an event across multiple exchanges. If provided, the API will return data for the specified event.
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `effectiveDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RightsIssuesResponse} and HTTP response
*/
getRightsIssuesWithHttpInfo(opts) {
opts = opts || {};
let postBody = null;
let pathParams = {};
let queryParams = {
'eventIds': this.apiClient.buildCollectionParam(opts['eventIds'], 'csv'),
'ids': this.apiClient.buildCollectionParam(opts['ids'], 'csv'),
'startDate': opts['startDate'],
'endDate': opts['endDate'],
'exchanges': this.apiClient.buildCollectionParam(opts['exchanges'], 'csv'),
'_sort': this.apiClient.buildCollectionParam(opts['sort'], 'csv'),
'_paginationLimit': opts['paginationLimit'],
'_paginationOffset': opts['paginationOffset']
};
let headerParams = {};
let formParams = {};
let authNames = ['FactSetApiKey', 'FactSetOAuth2'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = _RightsIssuesResponse.default;
return this.apiClient.callApi('/factset-global-prices/v1/calendar/rights-issues', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
}
/**
* Retrieve Rights Issue information
* Retrieves the prices, relevant dates, and other specifics over a specified date range for Rights Issue events. To retrieve details of a given event for a company on a specific exchange, please pass both the eventId and the company identifier. Note that passing eventId or (`eventId` + `ids`) will cause the end point to ignore the other parameters. Passing values for any other combination of the parameters (`ids`, `startDate`, `endDate` and `exchanges`) will lead to an AND operation for all the parameters passed.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.eventIds FactSet Event Identifier - a unique identifier for an event across multiple exchanges. If provided, the API will return data for the specified event.
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `effectiveDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return { Promise.< module:model/RightsIssuesResponse > } a Promise, with data of type {@link module:model/RightsIssuesResponse }
*/
getRightsIssues(opts) {
return this.getRightsIssuesWithHttpInfo(opts).then(function (response_and_data) {
return response_and_data.data;
});
}
/**
* Retrieve Spin Off information
* Retrieves the price adjustment factors, dates, and other specifics over a specified date range for Spin Off events. To retrieve details of a given event for a company on a specific exchange, please pass both the eventId and the company identifier. Note that passing eventId or (`eventId` + `ids`) will cause the end point to ignore the other parameters. Passing values for any other combination of the parameters (`ids`, `startDate`, `endDate` and `exchanges`) will lead to an AND operation for all the parameters passed.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.eventIds FactSet Event Identifier - a unique identifier for an event across multiple exchanges. If provided, the API will return data for the specified event.
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `effectiveDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SpinOffsResponse} and HTTP response
*/
getSpinOffsWithHttpInfo(opts) {
opts = opts || {};
let postBody = null;
let pathParams = {};
let queryParams = {
'eventIds': this.apiClient.buildCollectionParam(opts['eventIds'], 'csv'),
'ids': this.apiClient.buildCollectionParam(opts['ids'], 'csv'),
'startDate': opts['startDate'],
'endDate': opts['endDate'],
'exchanges': this.apiClient.buildCollectionParam(opts['exchanges'], 'csv'),
'_sort': this.apiClient.buildCollectionParam(opts['sort'], 'csv'),
'_paginationLimit': opts['paginationLimit'],
'_paginationOffset': opts['paginationOffset']
};
let headerParams = {};
let formParams = {};
let authNames = ['FactSetApiKey', 'FactSetOAuth2'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = _SpinOffsResponse.default;
return this.apiClient.callApi('/factset-global-prices/v1/calendar/spin-offs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
}
/**
* Retrieve Spin Off information
* Retrieves the price adjustment factors, dates, and other specifics over a specified date range for Spin Off events. To retrieve details of a given event for a company on a specific exchange, please pass both the eventId and the company identifier. Note that passing eventId or (`eventId` + `ids`) will cause the end point to ignore the other parameters. Passing values for any other combination of the parameters (`ids`, `startDate`, `endDate` and `exchanges`) will lead to an AND operation for all the parameters passed.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.eventIds FactSet Event Identifier - a unique identifier for an event across multiple exchanges. If provided, the API will return data for the specified event.
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `effectiveDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return { Promise.< module:model/SpinOffsResponse > } a Promise, with data of type {@link module:model/SpinOffsResponse }
*/
getSpinOffs(opts) {
return this.getSpinOffsWithHttpInfo(opts).then(function (response_and_data) {
return response_and_data.data;
});
}
/**
* Retrieve Split information
* Retrieves the split factors, dates, and other specifics over a specified date range for Forward Split, Reverse Split, Split and Exchange of Securities event types. To retrieve details of a given event for a company on a specific exchange, please pass both the eventId and the company identifier. Note that passing eventId or (`eventId` + `ids`) will cause the end point to ignore the other parameters. Passing values for any other combination of the parameters (`ids`, `startDate`, `endDate` and `exchanges`) will lead to an AND operation for all the parameters passed.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.eventIds FactSet Event Identifier - a unique identifier for an event across multiple exchanges. If provided, the API will return data for the specified event.
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `effectiveDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SplitsResponseCalendar} and HTTP response
*/
getSplitsWithHttpInfo(opts) {
opts = opts || {};
let postBody = null;
let pathParams = {};
let queryParams = {
'eventIds': this.apiClient.buildCollectionParam(opts['eventIds'], 'csv'),
'ids': this.apiClient.buildCollectionParam(opts['ids'], 'csv'),
'startDate': opts['startDate'],
'endDate': opts['endDate'],
'exchanges': this.apiClient.buildCollectionParam(opts['exchanges'], 'csv'),
'_sort': this.apiClient.buildCollectionParam(opts['sort'], 'csv'),
'_paginationLimit': opts['paginationLimit'],
'_paginationOffset': opts['paginationOffset']
};
let headerParams = {};
let formParams = {};
let authNames = ['FactSetApiKey', 'FactSetOAuth2'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = _SplitsResponseCalendar.default;
return this.apiClient.callApi('/factset-global-prices/v1/calendar/splits', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
}
/**
* Retrieve Split information
* Retrieves the split factors, dates, and other specifics over a specified date range for Forward Split, Reverse Split, Split and Exchange of Securities event types. To retrieve details of a given event for a company on a specific exchange, please pass both the eventId and the company identifier. Note that passing eventId or (`eventId` + `ids`) will cause the end point to ignore the other parameters. Passing values for any other combination of the parameters (`ids`, `startDate`, `endDate` and `exchanges`) will lead to an AND operation for all the parameters passed.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.eventIds FactSet Event Identifier - a unique identifier for an event across multiple exchanges. If provided, the API will return data for the specified event.
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `effectiveDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return { Promise.< module:model/SplitsResponseCalendar > } a Promise, with data of type {@link module:model/SplitsResponseCalendar }
*/
getSplits(opts) {
return this.getSplitsWithHttpInfo(opts).then(function (response_and_data) {
return response_and_data.data;
});
}
/**
* Retrieve Stock Distribution information
* Retrieves detailed stock distribution information including price adjustment factors, relevant dates, and other specifics for Stock Dividends, Stock Dividends(Special), Bonus Issues, and Bonus Issues(Special) events within the specified date range. To retrieve details of a given event for a company on a specific exchange, please pass both the eventId and the company identifier. Note that passing eventId or (`eventId` + `ids`) will cause the end point to ignore the other parameters. Passing values for any other combination of the parameters (`ids`, `startDate`, `endDate` and `exchanges`) will lead to an AND operation for all the parameters passed.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.eventIds FactSet Event Identifier - a unique identifier for an event across multiple exchanges. If provided, the API will return data for the specified event.
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `effectiveDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/StockDistributionsResponseCalendar} and HTTP response
*/
getStockDistributionsWithHttpInfo(opts) {
opts = opts || {};
let postBody = null;
let pathParams = {};
let queryParams = {
'eventIds': this.apiClient.buildCollectionParam(opts['eventIds'], 'csv'),
'ids': this.apiClient.buildCollectionParam(opts['ids'], 'csv'),
'startDate': opts['startDate'],
'endDate': opts['endDate'],
'exchanges': this.apiClient.buildCollectionParam(opts['exchanges'], 'csv'),
'_sort': this.apiClient.buildCollectionParam(opts['sort'], 'csv'),
'_paginationLimit': opts['paginationLimit'],
'_paginationOffset': opts['paginationOffset']
};
let headerParams = {};
let formParams = {};
let authNames = ['FactSetApiKey', 'FactSetOAuth2'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = _StockDistributionsResponseCalendar.default;
return this.apiClient.callApi('/factset-global-prices/v1/calendar/stock-distributions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
}
/**
* Retrieve Stock Distribution information
* Retrieves detailed stock distribution information including price adjustment factors, relevant dates, and other specifics for Stock Dividends, Stock Dividends(Special), Bonus Issues, and Bonus Issues(Special) events within the specified date range. To retrieve details of a given event for a company on a specific exchange, please pass both the eventId and the company identifier. Note that passing eventId or (`eventId` + `ids`) will cause the end point to ignore the other parameters. Passing values for any other combination of the parameters (`ids`, `startDate`, `endDate` and `exchanges`) will lead to an AND operation for all the parameters passed.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.eventIds FactSet Event Identifier - a unique identifier for an event across multiple exchanges. If provided, the API will return data for the specified event.
* @param {Array.<String>} opts.ids The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. If not specified, the data related to all the IDs is returned.
* @param {Date} opts.startDate The start date requested for a given date range in **YYYY-MM-DD** format. If both start and end dates are omitted, the API will return data for the current week starting from Monday.
* @param {Date} opts.endDate The end date requested for a given date range in **YYYY-MM-DD** format. The max date range is 1 year for up to 100 identifiers. If IDs are more than 100 or omitted, the max range is restricted to 90 days.
* @param {Array.<String>} opts.exchanges One or more exchange codes for which data is to be requested. When omitted, the data from all the supported exchanges is returned. See `/meta/exchanges` for available values.
* @param {Array.<module:model/String>} opts.sort Sorts the field in ascending or descending order of `effectiveDate`.
* @param {Number} opts.paginationLimit Specifies the number of results to return per page. The maximum limit is 500. (default to 50)
* @param {Number} opts.paginationOffset Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results. (default to 0)
* @return { Promise.< module:model/StockDistributionsResponseCalendar > } a Promise, with data of type {@link module:model/StockDistributionsResponseCalendar }
*/
getStockDistributions(opts) {
return this.getStockDistributionsWithHttpInfo(opts).then(function (response_and_data) {
return response_and_data.data;
});
}
}
exports.default = CorporateActionsForCalendarApi;