All URIs are relative to https://api.factset.com/content
Method | HTTP request | Description |
---|---|---|
getMarketValue | GET /factset-prices/v1/market-value | Gets the security level and company level market values for a list of `ids` as of given date range and frequency. |
getMarketValueForList | POST /factset-prices/v1/market-value | Requests the market value for a list of `ids` as of given date range. |
MarketValueResponse getMarketValue(ids, opts)
Gets the security level and company level market values for a list of `ids` as of given date range and frequency.
Gets market capitalization of list of ids for the company level, security level, calendar, frequency, and currency for a specified date range.
Important
The parameter variables defined below are just examples and may potentially contain non valid values. Please replace them with valid values.
const { ApiClient, MarketValueApi } = require('@factset/sdk-factsetprices');
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 MarketValueApi();
const ids = ["AAPL-USA"]; // [String] | The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent Ids. <p>***ids limit** = 2000 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 = {
'startDate': 2019-01-01, // String | The start date requested for a given date range in **YYYY-MM-DD** format. If left blank, the API will default to previous close. Future dates (T+1) are not accepted in this endpoint.
'endDate': 2019-12-31, // String | The end date requested for a given date range in **YYYY-MM-DD** format. If left blank, the API will default to previous close. Future dates (T+1) are not accepted in this endpoint.
'frequency': D, // String | Controls the display frequency of the data returned. * **D** = Daily * **W** = Weekly, based on the last day of the week of the start date. * **M** = Monthly, based on the last trading day of the month. * **AM** = Monthly, based on the start date (e.g., if the start date is June 16, data is displayed for June 16, May 16, April 16 etc.). * **CQ** = Quarterly based on the last trading day of the calendar quarter (March, June, September, or December). * **FQ** = Fiscal Quarter of the company. * **AY** = Actual Annual, based on the start date. * **CY** = Calendar Annual, based on the last trading day of the calendar year. * **FY** = Fiscal Annual, based on the last trading day of the company's fiscal year.
'calendar': FIVEDAY, // String | Calendar of data returned. SEVENDAY includes weekends. LOCAL calendar will default to the securities' trading calendar which excludes date records for respective holiday periods.
'currency': USD // String | Currency code for adjusting prices. Default is Local. For a list of currency ISO codes, visit [Online Assistant Page 1470](https://oa.apps.factset.com/pages/1470).
};
// Call api endpoint
apiInstance.getMarketValue(ids, opts).then(
data => {
console.log('API called successfully. Returned data:');
console.log(data);
},
error => {
console.error(error);
},
);
Name | Type | Description | Notes |
---|---|---|---|
ids | [String] | The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent Ids. <p>ids limit = 2000 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> | |
startDate | String | The start date requested for a given date range in YYYY-MM-DD format. If left blank, the API will default to previous close. Future dates (T+1) are not accepted in this endpoint. | [optional] |
endDate | String | The end date requested for a given date range in YYYY-MM-DD format. If left blank, the API will default to previous close. Future dates (T+1) are not accepted in this endpoint. | [optional] |
frequency | String | Controls the display frequency of the data returned. * D = Daily * W = Weekly, based on the last day of the week of the start date. * M = Monthly, based on the last trading day of the month. * AM = Monthly, based on the start date (e.g., if the start date is June 16, data is displayed for June 16, May 16, April 16 etc.). * CQ = Quarterly based on the last trading day of the calendar quarter (March, June, September, or December). * FQ = Fiscal Quarter of the company. * AY = Actual Annual, based on the start date. * CY = Calendar Annual, based on the last trading day of the calendar year. * FY = Fiscal Annual, based on the last trading day of the company's fiscal year. | [optional] [default to 'D'] |
calendar | String | Calendar of data returned. SEVENDAY includes weekends. LOCAL calendar will default to the securities' trading calendar which excludes date records for respective holiday periods. | [optional] [default to 'FIVEDAY'] |
currency | String | Currency code for adjusting prices. Default is Local. For a list of currency ISO codes, visit Online Assistant Page 1470. | [optional] |
- Content-Type: Not defined
- Accept: application/json
MarketValueResponse getMarketValueForList(marketValueRequest)
Requests the market value for a list of `ids` as of given date range.
Requests the market value for a list of `ids` as of given date range.
Important
The parameter variables defined below are just examples and may potentially contain non valid values. Please replace them with valid values.
const { ApiClient, MarketValueApi } = require('@factset/sdk-factsetprices');
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 MarketValueApi();
const marketValueRequest = new factsetprices.MarketValueRequest(); // MarketValueRequest | Request object for `Security` market values.
// Call api endpoint
apiInstance.getMarketValueForList(marketValueRequest).then(
data => {
console.log('API called successfully. Returned data:');
console.log(data);
},
error => {
console.error(error);
},
);
Name | Type | Description | Notes |
---|---|---|---|
marketValueRequest | MarketValueRequest | Request object for `Security` market values. |
- Content-Type: application/json
- Accept: application/json