Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.factset.sdk.FactSetBenchmarks.api;
import com.factset.sdk.FactSetBenchmarks.ApiException;
import com.factset.sdk.FactSetBenchmarks.ApiClient;
import com.factset.sdk.FactSetBenchmarks.ApiResponse;
import com.factset.sdk.FactSetBenchmarks.Configuration;
import com.factset.sdk.FactSetBenchmarks.Pair;
import jakarta.ws.rs.core.GenericType;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import com.factset.sdk.FactSetBenchmarks.models.BenchmarkRatiosRequest;
import com.factset.sdk.FactSetBenchmarks.models.BenchmarkRatiosResponse;
import com.factset.sdk.FactSetBenchmarks.models.ErrorResponse;
import com.factset.sdk.FactSetBenchmarks.models.IndexHistoryRequest;
import com.factset.sdk.FactSetBenchmarks.models.IndexHistoryResponse;
import com.factset.sdk.FactSetBenchmarks.models.IndexSnapshotRequest;
import com.factset.sdk.FactSetBenchmarks.models.IndexSnapshotResponse;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class IndexLevelApi {
private ApiClient apiClient;
public IndexLevelApi() {
this(Configuration.getDefaultApiClient());
}
public IndexLevelApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
private static final Map getBenchmarkRatiosResponseTypeMap = new HashMap();
static {
getBenchmarkRatiosResponseTypeMap.put(200, new GenericType(){});
getBenchmarkRatiosResponseTypeMap.put(400, new GenericType(){});
getBenchmarkRatiosResponseTypeMap.put(401, new GenericType(){});
getBenchmarkRatiosResponseTypeMap.put(403, new GenericType(){});
getBenchmarkRatiosResponseTypeMap.put(415, new GenericType(){});
getBenchmarkRatiosResponseTypeMap.put(500, new GenericType(){});
}
private static final Map getBenchmarkRatiosForListResponseTypeMap = new HashMap();
static {
getBenchmarkRatiosForListResponseTypeMap.put(200, new GenericType(){});
getBenchmarkRatiosForListResponseTypeMap.put(400, new GenericType(){});
getBenchmarkRatiosForListResponseTypeMap.put(401, new GenericType(){});
getBenchmarkRatiosForListResponseTypeMap.put(403, new GenericType(){});
getBenchmarkRatiosForListResponseTypeMap.put(415, new GenericType(){});
getBenchmarkRatiosForListResponseTypeMap.put(500, new GenericType(){});
}
private static final Map getIndexHistoryResponseTypeMap = new HashMap();
static {
getIndexHistoryResponseTypeMap.put(200, new GenericType(){});
getIndexHistoryResponseTypeMap.put(400, new GenericType(){});
getIndexHistoryResponseTypeMap.put(401, new GenericType(){});
getIndexHistoryResponseTypeMap.put(403, new GenericType(){});
getIndexHistoryResponseTypeMap.put(415, new GenericType(){});
getIndexHistoryResponseTypeMap.put(500, new GenericType(){});
}
private static final Map getIndexHistoryForListResponseTypeMap = new HashMap();
static {
getIndexHistoryForListResponseTypeMap.put(200, new GenericType(){});
getIndexHistoryForListResponseTypeMap.put(400, new GenericType(){});
getIndexHistoryForListResponseTypeMap.put(401, new GenericType(){});
getIndexHistoryForListResponseTypeMap.put(403, new GenericType(){});
getIndexHistoryForListResponseTypeMap.put(415, new GenericType(){});
getIndexHistoryForListResponseTypeMap.put(500, new GenericType(){});
}
private static final Map getIndexSnapshotResponseTypeMap = new HashMap();
static {
getIndexSnapshotResponseTypeMap.put(200, new GenericType(){});
getIndexSnapshotResponseTypeMap.put(400, new GenericType(){});
getIndexSnapshotResponseTypeMap.put(401, new GenericType(){});
getIndexSnapshotResponseTypeMap.put(403, new GenericType(){});
getIndexSnapshotResponseTypeMap.put(415, new GenericType(){});
getIndexSnapshotResponseTypeMap.put(500, new GenericType(){});
}
private static final Map getIndexSnapshotForListResponseTypeMap = new HashMap();
static {
getIndexSnapshotForListResponseTypeMap.put(200, new GenericType(){});
getIndexSnapshotForListResponseTypeMap.put(400, new GenericType(){});
getIndexSnapshotForListResponseTypeMap.put(401, new GenericType(){});
getIndexSnapshotForListResponseTypeMap.put(403, new GenericType(){});
getIndexSnapshotForListResponseTypeMap.put(415, new GenericType(){});
getIndexSnapshotForListResponseTypeMap.put(500, new GenericType(){});
}
/**
* Get the API client
*
* @return API client
*/
public ApiClient getApiClient() {
return apiClient;
}
/**
* Set the API client
*
* @param apiClient an instance of API client
*/
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Returns the aggregated ratios of a requested benchmark
* Retrieves the index level ratios for a requested benchmark. Ratios supported are expressed through metrics parameter, and include Categories of Profitability, Valuation, Coverage, and Leverage. <p> Using FactSet Market Aggregates, the service combines fundamental, estimates, and pricing content to derive ratios and per share values for global equity market indexes and commercial benchmark vendors. The constituents of the index are fetched on rolling basis over time period requested, and then the metric requested is aggregated up to the index level. To learn more about FMA, visit [OA 15778](https://my.apps.factset.com/oa/pages/15778).</p>
* @param ids Benchmark Identifiers. Reference the helper endpoint **_/id-list** to get a sample list of valid identifiers. <p>***ids limit** = 500 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>* (required)
* @param metrics Requested List of FactSet Market Aggregates (FMA) or ratios. provided the below complete metrics list. |metric item|Description|category|periodicity |:---|:---|:---|:---| |GROSS_MARGIN|Gross Margin|Profitability (%)|NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |OPER_INC_SALES|Operating Margin|Profitability (%)|LTM, QTR |NET_MGN|Net Margin|Profitability (%)|NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |EBIT_MARGIN|EBIT Margin|Profitability (%)| NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |EBITDA_MARGIN|EBITDA Margin|Profitability (%)|NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |ROA|Return on Assets|Profitability (%)|LTM |ROE|Return on Equity|Profitability (%)|NTMA, LTMA, LTM, 0, 1, 2 |ROIC|Return on Invested Capital|Profitability (%)| LTM |FCF_MGN|Free Cash Flow Margin|Profitability (%)|LTM, QTR |PE|Price/Earnings|Valuation|NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |PEX|Price/Earnings (excl negatives)|Valuation|LTM |PSALES|Price/Sales|Valuation|NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |PBK|Price/Book Value|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |PCF|Price/Cash Flow|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |PCFX|Price/Cash Flow (excl negatives)|Valuation|LTM |PFCF|Price/Free Cash Flow|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |EVAL_EBIT|Enterprise Value/EBIT|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |EVAL_EBITDA|Enterprise Value/EBITDA|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |EVAL_SALES|Enterprise Value/Sales|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |NDEBT_EBITDA|Net Debt/EBITDA|Coverage|NTMA, LTMA, LTM, 0, 1, 2 |NDEBT_EBITDA_MIN_CAPEX|Net Debt/(EBITDA-Capex)|Coverage|LTM |DEBT_EBITDA|Total Debt/EBITDA|Coverage|LTM |DEBT_EBIT|Total Debt/EBIT|Coverage|LTM |EBIT_INT_EXP|EBIT/Interest Expense (Int. Coverage)|Coverage|LTM |EBITDA_INT_EXP|EBITDA/Interest Expense|Coverage|LTM |OPER_CF_INT_EXP|CFO/Interest Expense|Coverage|LTM |LTD_EBITDA|LT Debt/EBITDA|Coverage|LTM |NDEBT_FFO|Net Debt/FFO|Coverage|LTM |LTD_FFO|LT Debt/FFO|Coverage|LTM |FCF_DEBT|FCF/Total Debt|Coverage|LTM |OPER_CF_DEBT|CFO/Total Debt|Coverage|LTM |LTD_EQ|LT Debt/Total Equity|Leverage(%)|LTM |LTD_TCAP|LT Debt/Total Capital|Leverage(%)|LTM |LTD_ASSETS|LT Debt/Total Assets|Leverage(%)|LTM |DEBT_ASSETS|Total Debt/Total Assets|Leverage(%)|LTM |DEBT_EQ|Total Debt/Total Equity|Leverage(%)|LTM |NDEBT_TCAP|Net Debt/Total Capital|Leverage(%)|LTM |DEBT_TCAP|Total Debt/Total Capital|Leverage(%)|LTM |<p>***metrics limit** = 38 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>* (required)
* @param startDate Requested start date expressed in YYYY-MM-DD format. (optional)
* @param endDate Requested End Date for Range expressed in YYYY-MM-DD format. (optional)
* @param frequency 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). * **AY** = Actual Annual, based on the start date. * **CY** = Calendar Annual, based on the last trading day of the calendar year. (optional, default to D)
* @param periodicity The calculation periodicity for the aggregated period. **Note** - Not all periodicities are supported for each metric, depending on the type of ratio. LTM is set as default and supported for all metrics. See Metrics Parameter for additional detail on which periodicities are available per metric. |Periodicity| Description| |:---|:---| |LTM| Last Twelve Months |LTMA| Last Twelve Months using Broker Actuals for Estimated Items |STMA| Second Twelve Month Forward |NTMA| 12 Month Forward |0| Latest Reported Calendar Year |1| Current Unreported Year |2| Following Year |QTR| Quarterly - Reported by companies (optional, default to LTM)
* @param currency Currency for response. (optional)
* @return BenchmarkRatiosResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Benchmark Ratio data items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public BenchmarkRatiosResponse getBenchmarkRatios(java.util.List ids, java.util.List metrics, String startDate, String endDate, String frequency, String periodicity, String currency) throws ApiException {
return getBenchmarkRatiosWithHttpInfo(ids, metrics, startDate, endDate, frequency, periodicity, currency).getData();
}
/**
* Returns the aggregated ratios of a requested benchmark
* Retrieves the index level ratios for a requested benchmark. Ratios supported are expressed through metrics parameter, and include Categories of Profitability, Valuation, Coverage, and Leverage. <p> Using FactSet Market Aggregates, the service combines fundamental, estimates, and pricing content to derive ratios and per share values for global equity market indexes and commercial benchmark vendors. The constituents of the index are fetched on rolling basis over time period requested, and then the metric requested is aggregated up to the index level. To learn more about FMA, visit [OA 15778](https://my.apps.factset.com/oa/pages/15778).</p>
* @param ids Benchmark Identifiers. Reference the helper endpoint **_/id-list** to get a sample list of valid identifiers. <p>***ids limit** = 500 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>* (required)
* @param metrics Requested List of FactSet Market Aggregates (FMA) or ratios. provided the below complete metrics list. |metric item|Description|category|periodicity |:---|:---|:---|:---| |GROSS_MARGIN|Gross Margin|Profitability (%)|NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |OPER_INC_SALES|Operating Margin|Profitability (%)|LTM, QTR |NET_MGN|Net Margin|Profitability (%)|NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |EBIT_MARGIN|EBIT Margin|Profitability (%)| NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |EBITDA_MARGIN|EBITDA Margin|Profitability (%)|NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |ROA|Return on Assets|Profitability (%)|LTM |ROE|Return on Equity|Profitability (%)|NTMA, LTMA, LTM, 0, 1, 2 |ROIC|Return on Invested Capital|Profitability (%)| LTM |FCF_MGN|Free Cash Flow Margin|Profitability (%)|LTM, QTR |PE|Price/Earnings|Valuation|NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |PEX|Price/Earnings (excl negatives)|Valuation|LTM |PSALES|Price/Sales|Valuation|NTMA, LTMA, STMA, LTM, QTR, 0, 1, 2 |PBK|Price/Book Value|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |PCF|Price/Cash Flow|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |PCFX|Price/Cash Flow (excl negatives)|Valuation|LTM |PFCF|Price/Free Cash Flow|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |EVAL_EBIT|Enterprise Value/EBIT|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |EVAL_EBITDA|Enterprise Value/EBITDA|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |EVAL_SALES|Enterprise Value/Sales|Valuation|NTMA, LTMA, LTM, 0, 1, 2 |NDEBT_EBITDA|Net Debt/EBITDA|Coverage|NTMA, LTMA, LTM, 0, 1, 2 |NDEBT_EBITDA_MIN_CAPEX|Net Debt/(EBITDA-Capex)|Coverage|LTM |DEBT_EBITDA|Total Debt/EBITDA|Coverage|LTM |DEBT_EBIT|Total Debt/EBIT|Coverage|LTM |EBIT_INT_EXP|EBIT/Interest Expense (Int. Coverage)|Coverage|LTM |EBITDA_INT_EXP|EBITDA/Interest Expense|Coverage|LTM |OPER_CF_INT_EXP|CFO/Interest Expense|Coverage|LTM |LTD_EBITDA|LT Debt/EBITDA|Coverage|LTM |NDEBT_FFO|Net Debt/FFO|Coverage|LTM |LTD_FFO|LT Debt/FFO|Coverage|LTM |FCF_DEBT|FCF/Total Debt|Coverage|LTM |OPER_CF_DEBT|CFO/Total Debt|Coverage|LTM |LTD_EQ|LT Debt/Total Equity|Leverage(%)|LTM |LTD_TCAP|LT Debt/Total Capital|Leverage(%)|LTM |LTD_ASSETS|LT Debt/Total Assets|Leverage(%)|LTM |DEBT_ASSETS|Total Debt/Total Assets|Leverage(%)|LTM |DEBT_EQ|Total Debt/Total Equity|Leverage(%)|LTM |NDEBT_TCAP|Net Debt/Total Capital|Leverage(%)|LTM |DEBT_TCAP|Total Debt/Total Capital|Leverage(%)|LTM |<p>***metrics limit** = 38 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>* (required)
* @param startDate Requested start date expressed in YYYY-MM-DD format. (optional)
* @param endDate Requested End Date for Range expressed in YYYY-MM-DD format. (optional)
* @param frequency 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). * **AY** = Actual Annual, based on the start date. * **CY** = Calendar Annual, based on the last trading day of the calendar year. (optional, default to D)
* @param periodicity The calculation periodicity for the aggregated period. **Note** - Not all periodicities are supported for each metric, depending on the type of ratio. LTM is set as default and supported for all metrics. See Metrics Parameter for additional detail on which periodicities are available per metric. |Periodicity| Description| |:---|:---| |LTM| Last Twelve Months |LTMA| Last Twelve Months using Broker Actuals for Estimated Items |STMA| Second Twelve Month Forward |NTMA| 12 Month Forward |0| Latest Reported Calendar Year |1| Current Unreported Year |2| Following Year |QTR| Quarterly - Reported by companies (optional, default to LTM)
* @param currency Currency for response. (optional)
* @return ApiResponse<BenchmarkRatiosResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Benchmark Ratio data items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public ApiResponse getBenchmarkRatiosWithHttpInfo(java.util.List ids, java.util.List metrics, String startDate, String endDate, String frequency, String periodicity, String currency) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'ids' is set
if (ids == null) {
throw new ApiException(400, "Missing the required parameter 'ids' when calling getBenchmarkRatios");
}
// verify the required parameter 'metrics' is set
if (metrics == null) {
throw new ApiException(400, "Missing the required parameter 'metrics' when calling getBenchmarkRatios");
}
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/ratios";
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ids", ids));
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "metrics", metrics));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "startDate", startDate));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "endDate", endDate));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "frequency", frequency));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "periodicity", periodicity));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "currency", currency));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
BenchmarkRatiosResponse
> apiResponse = apiClient.invokeAPI("IndexLevelApi.getBenchmarkRatios", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getBenchmarkRatiosResponseTypeMap, false);
return apiResponse;
}
/**
* Returns the aggregated ratios of a requested benchmark
* Retrieves the index level ratios for a requested benchmark. Ratios supported are expressed through metrics parameter, and include Categories of Profitability, Valuation, Coverage, and Leverage. <p> Using FactSet Market Aggregates, the service combines FactSet Fundamental, FactSet Estimates, and FactSet Pricing content to derive ratios and per share values for global equity market indexes and commercial benchmark vendors. The constituents of the index are fetched on rolling basis over time period requested, and then the metric requested is aggregated up to the index level. To learn more about FMA, visit [OA 15778](https://my.apps.factset.com/oa/pages/15778).</p>
* @param benchmarkRatiosRequest Requests benchmark ratios for a given id (required)
* @return BenchmarkRatiosResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Benchmark Ratio Response Items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public BenchmarkRatiosResponse getBenchmarkRatiosForList(BenchmarkRatiosRequest benchmarkRatiosRequest) throws ApiException {
return getBenchmarkRatiosForListWithHttpInfo(benchmarkRatiosRequest).getData();
}
/**
* Returns the aggregated ratios of a requested benchmark
* Retrieves the index level ratios for a requested benchmark. Ratios supported are expressed through metrics parameter, and include Categories of Profitability, Valuation, Coverage, and Leverage. <p> Using FactSet Market Aggregates, the service combines FactSet Fundamental, FactSet Estimates, and FactSet Pricing content to derive ratios and per share values for global equity market indexes and commercial benchmark vendors. The constituents of the index are fetched on rolling basis over time period requested, and then the metric requested is aggregated up to the index level. To learn more about FMA, visit [OA 15778](https://my.apps.factset.com/oa/pages/15778).</p>
* @param benchmarkRatiosRequest Requests benchmark ratios for a given id (required)
* @return ApiResponse<BenchmarkRatiosResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Benchmark Ratio Response Items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public ApiResponse getBenchmarkRatiosForListWithHttpInfo(BenchmarkRatiosRequest benchmarkRatiosRequest) throws ApiException {
Object localVarPostBody = benchmarkRatiosRequest;
// verify the required parameter 'benchmarkRatiosRequest' is set
if (benchmarkRatiosRequest == null) {
throw new ApiException(400, "Missing the required parameter 'benchmarkRatiosRequest' when calling getBenchmarkRatiosForList");
}
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/ratios";
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
BenchmarkRatiosResponse
> apiResponse = apiClient.invokeAPI("IndexLevelApi.getBenchmarkRatiosForList", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getBenchmarkRatiosForListResponseTypeMap, false);
return apiResponse;
}
/**
* Retrieves Index Level Prices and Returns information for a list of identifiers and historical date range.
* Retrieves Index Level Prices and Returns information as of a date range requested. Simply submit a valid Benchmark ID (you can use the /id-list endpoint for a sample list of ids), and date range to retrieve Index Level Prices, Returns, and related information.
* @param ids Benchmark Identifiers. Reference the helper endpoint **_/id-list** to get a sample list of valid identifiers. <p>***ids limit** = 500 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>* (required)
* @param startDate Requested start date expressed in YYYY-MM-DD format. (optional)
* @param endDate Requested End Date for Range expressed in YYYY-MM-DD format. (optional)
* @param frequency 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). * **AY** = Actual Annual, based on the start date. * **CY** = Calendar Annual, based on the last trading day of the calendar year. (optional, default to D)
* @param returnType The return type adjustment used in returns response items. Adjustment can be made for GROSS and NET dividends that will be included in the return calculation. The service will default to GROSS. (optional, default to GROSS)
* @param hedgeType The hedge type adjustment used in returns response items. Adjustment can be made for HEDGED and UNHEDGED values that will be included in the return calculation. The service will default to UNHEDGED. (optional, default to UNHEDGED)
* @param currency Currency for response. (optional)
* @param calendar Calendar of data returned. SEVENDAY includes weekends. (optional, default to FIVEDAY)
* @param impliedDate This parameter controls the **date** returned in the date field. The default value is **N**. By default, the date field returns the actual date of the observation. This means it will repeat values for weekends and holidays. If set to **Y**, the date field will return the implied date of the observation, making all the dates unique. (optional, default to N)
* @return IndexHistoryResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
An array of Index Level Prices and Returns information for a requested date range.
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public IndexHistoryResponse getIndexHistory(java.util.List ids, String startDate, String endDate, String frequency, String returnType, String hedgeType, String currency, String calendar, String impliedDate) throws ApiException {
return getIndexHistoryWithHttpInfo(ids, startDate, endDate, frequency, returnType, hedgeType, currency, calendar, impliedDate).getData();
}
/**
* Retrieves Index Level Prices and Returns information for a list of identifiers and historical date range.
* Retrieves Index Level Prices and Returns information as of a date range requested. Simply submit a valid Benchmark ID (you can use the /id-list endpoint for a sample list of ids), and date range to retrieve Index Level Prices, Returns, and related information.
* @param ids Benchmark Identifiers. Reference the helper endpoint **_/id-list** to get a sample list of valid identifiers. <p>***ids limit** = 500 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>* (required)
* @param startDate Requested start date expressed in YYYY-MM-DD format. (optional)
* @param endDate Requested End Date for Range expressed in YYYY-MM-DD format. (optional)
* @param frequency 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). * **AY** = Actual Annual, based on the start date. * **CY** = Calendar Annual, based on the last trading day of the calendar year. (optional, default to D)
* @param returnType The return type adjustment used in returns response items. Adjustment can be made for GROSS and NET dividends that will be included in the return calculation. The service will default to GROSS. (optional, default to GROSS)
* @param hedgeType The hedge type adjustment used in returns response items. Adjustment can be made for HEDGED and UNHEDGED values that will be included in the return calculation. The service will default to UNHEDGED. (optional, default to UNHEDGED)
* @param currency Currency for response. (optional)
* @param calendar Calendar of data returned. SEVENDAY includes weekends. (optional, default to FIVEDAY)
* @param impliedDate This parameter controls the **date** returned in the date field. The default value is **N**. By default, the date field returns the actual date of the observation. This means it will repeat values for weekends and holidays. If set to **Y**, the date field will return the implied date of the observation, making all the dates unique. (optional, default to N)
* @return ApiResponse<IndexHistoryResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
An array of Index Level Prices and Returns information for a requested date range.
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public ApiResponse getIndexHistoryWithHttpInfo(java.util.List ids, String startDate, String endDate, String frequency, String returnType, String hedgeType, String currency, String calendar, String impliedDate) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'ids' is set
if (ids == null) {
throw new ApiException(400, "Missing the required parameter 'ids' when calling getIndexHistory");
}
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/index-history";
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ids", ids));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "startDate", startDate));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "endDate", endDate));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "frequency", frequency));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "returnType", returnType));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "hedgeType", hedgeType));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "currency", currency));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "calendar", calendar));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "impliedDate", impliedDate));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
IndexHistoryResponse
> apiResponse = apiClient.invokeAPI("IndexLevelApi.getIndexHistory", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getIndexHistoryResponseTypeMap, false);
return apiResponse;
}
/**
* Retrieves Index Level Prices and Returns information for a list of identifiers and historical date range.
* Retrieves Index Level Prices and Returns information as aligned with FactSet's Benchmark Data Feed solution. Simply submit a valid Benchmark ID (you can use the /id-list endpoint for a sample list of ids), and date and retrieve Index Level Prices, Returns, and related information.
* @param indexHistoryRequest Requests Index Level History Prices and Returns for a list of identifiers and specified date range. (required)
* @return IndexHistoryResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
An array of Index Level Prices and Returns information for a requested date range.
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public IndexHistoryResponse getIndexHistoryForList(IndexHistoryRequest indexHistoryRequest) throws ApiException {
return getIndexHistoryForListWithHttpInfo(indexHistoryRequest).getData();
}
/**
* Retrieves Index Level Prices and Returns information for a list of identifiers and historical date range.
* Retrieves Index Level Prices and Returns information as aligned with FactSet's Benchmark Data Feed solution. Simply submit a valid Benchmark ID (you can use the /id-list endpoint for a sample list of ids), and date and retrieve Index Level Prices, Returns, and related information.
* @param indexHistoryRequest Requests Index Level History Prices and Returns for a list of identifiers and specified date range. (required)
* @return ApiResponse<IndexHistoryResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
An array of Index Level Prices and Returns information for a requested date range.
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public ApiResponse getIndexHistoryForListWithHttpInfo(IndexHistoryRequest indexHistoryRequest) throws ApiException {
Object localVarPostBody = indexHistoryRequest;
// verify the required parameter 'indexHistoryRequest' is set
if (indexHistoryRequest == null) {
throw new ApiException(400, "Missing the required parameter 'indexHistoryRequest' when calling getIndexHistoryForList");
}
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/index-history";
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
IndexHistoryResponse
> apiResponse = apiClient.invokeAPI("IndexLevelApi.getIndexHistoryForList", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getIndexHistoryForListResponseTypeMap, false);
return apiResponse;
}
/**
* Index Level Prices, Returns, and related information as of a single date.
* Retrieves Index Level Prices and Returns information as of a specific date. Simply submit a valid Benchmark ID (you can use the /id-list endpoint for a sample list of ids), and date and retrieve Index Level Prices, Returns, and related information.
* @param ids Benchmark Identifiers. Reference the helper endpoint **_/id-list** to get a sample list of valid identifiers. <p>***ids limit** = 500 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>* (required)
* @param date Date of holding expressed in YYYY-MM-DD format. (optional)
* @param returnType The return type adjustment used in returns response items. Adjustment can be made for GROSS and NET dividends that will be included in the return calculation. The service will default to GROSS. (optional, default to GROSS)
* @param currency Currency for response. (optional)
* @param calendar Calendar of data returned. SEVENDAY includes weekends. (optional, default to FIVEDAY)
* @return IndexSnapshotResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
An array of Index Level Prices and Returns information as of a single date
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public IndexSnapshotResponse getIndexSnapshot(java.util.List ids, String date, String returnType, String currency, String calendar) throws ApiException {
return getIndexSnapshotWithHttpInfo(ids, date, returnType, currency, calendar).getData();
}
/**
* Index Level Prices, Returns, and related information as of a single date.
* Retrieves Index Level Prices and Returns information as of a specific date. Simply submit a valid Benchmark ID (you can use the /id-list endpoint for a sample list of ids), and date and retrieve Index Level Prices, Returns, and related information.
* @param ids Benchmark Identifiers. Reference the helper endpoint **_/id-list** to get a sample list of valid identifiers. <p>***ids limit** = 500 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>* (required)
* @param date Date of holding expressed in YYYY-MM-DD format. (optional)
* @param returnType The return type adjustment used in returns response items. Adjustment can be made for GROSS and NET dividends that will be included in the return calculation. The service will default to GROSS. (optional, default to GROSS)
* @param currency Currency for response. (optional)
* @param calendar Calendar of data returned. SEVENDAY includes weekends. (optional, default to FIVEDAY)
* @return ApiResponse<IndexSnapshotResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
An array of Index Level Prices and Returns information as of a single date
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public ApiResponse getIndexSnapshotWithHttpInfo(java.util.List ids, String date, String returnType, String currency, String calendar) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'ids' is set
if (ids == null) {
throw new ApiException(400, "Missing the required parameter 'ids' when calling getIndexSnapshot");
}
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/index-snapshot";
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ids", ids));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "date", date));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "returnType", returnType));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "currency", currency));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "calendar", calendar));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
IndexSnapshotResponse
> apiResponse = apiClient.invokeAPI("IndexLevelApi.getIndexSnapshot", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getIndexSnapshotResponseTypeMap, false);
return apiResponse;
}
/**
* Retrieves the Index Level Snapshot of Prices and Returns information for a given identifier and single date.
* Retrieves Index Level Prices and Returns information as aligned with FactSet's Benchmark Data Feed solution. Simply submit a valid Benchmark ID (you can use the /id-list endpoint for a sample list of ids), and date and retrieve Index Level Prices, Returns, and related information.
* @param indexSnapshotRequest Requests the Index Level Snapshot for a requested list of identifiers and specified date. (required)
* @return IndexSnapshotResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
An array of Index Level Prices and Returns information as of a single date.
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public IndexSnapshotResponse getIndexSnapshotForList(IndexSnapshotRequest indexSnapshotRequest) throws ApiException {
return getIndexSnapshotForListWithHttpInfo(indexSnapshotRequest).getData();
}
/**
* Retrieves the Index Level Snapshot of Prices and Returns information for a given identifier and single date.
* Retrieves Index Level Prices and Returns information as aligned with FactSet's Benchmark Data Feed solution. Simply submit a valid Benchmark ID (you can use the /id-list endpoint for a sample list of ids), and date and retrieve Index Level Prices, Returns, and related information.
* @param indexSnapshotRequest Requests the Index Level Snapshot for a requested list of identifiers and specified date. (required)
* @return ApiResponse<IndexSnapshotResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
An array of Index Level Prices and Returns information as of a single date.
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public ApiResponse getIndexSnapshotForListWithHttpInfo(IndexSnapshotRequest indexSnapshotRequest) throws ApiException {
Object localVarPostBody = indexSnapshotRequest;
// verify the required parameter 'indexSnapshotRequest' is set
if (indexSnapshotRequest == null) {
throw new ApiException(400, "Missing the required parameter 'indexSnapshotRequest' when calling getIndexSnapshotForList");
}
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/index-snapshot";
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
IndexSnapshotResponse
> apiResponse = apiClient.invokeAPI("IndexLevelApi.getIndexSnapshotForList", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getIndexSnapshotForListResponseTypeMap, false);
return apiResponse;
}
}