All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.factset.sdk.FactSetEstimates.api.ConsensusApi Maven / Gradle / Ivy

package com.factset.sdk.FactSetEstimates.api;

import com.factset.sdk.FactSetEstimates.ApiException;
import com.factset.sdk.FactSetEstimates.ApiClient;
import com.factset.sdk.FactSetEstimates.ApiResponse;
import com.factset.sdk.FactSetEstimates.Configuration;
import com.factset.sdk.FactSetEstimates.Pair;

import jakarta.ws.rs.core.GenericType;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

import com.factset.sdk.FactSetEstimates.models.ConsensusResponse;
import com.factset.sdk.FactSetEstimates.models.ErrorResponse;
import com.factset.sdk.FactSetEstimates.models.FixedConsensusRequest;
import com.factset.sdk.FactSetEstimates.models.RollingConsensusRequest;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

public class ConsensusApi {
  private ApiClient apiClient;

  public ConsensusApi() {
    this(Configuration.getDefaultApiClient());
  }

  public ConsensusApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }
  
  private static final Map getFixedConsensusResponseTypeMap = new HashMap();
  static {
    getFixedConsensusResponseTypeMap.put(200, new GenericType(){});
    getFixedConsensusResponseTypeMap.put(400, new GenericType(){});
    getFixedConsensusResponseTypeMap.put(401, new GenericType(){});
    getFixedConsensusResponseTypeMap.put(403, new GenericType(){});
    getFixedConsensusResponseTypeMap.put(415, new GenericType(){});
    getFixedConsensusResponseTypeMap.put(500, new GenericType(){});
  }

  private static final Map getFixedConsensusForListResponseTypeMap = new HashMap();
  static {
    getFixedConsensusForListResponseTypeMap.put(200, new GenericType(){});
    getFixedConsensusForListResponseTypeMap.put(400, new GenericType(){});
    getFixedConsensusForListResponseTypeMap.put(401, new GenericType(){});
    getFixedConsensusForListResponseTypeMap.put(403, new GenericType(){});
    getFixedConsensusForListResponseTypeMap.put(415, new GenericType(){});
    getFixedConsensusForListResponseTypeMap.put(500, new GenericType(){});
  }

  private static final Map getRollingConsensusResponseTypeMap = new HashMap();
  static {
    getRollingConsensusResponseTypeMap.put(200, new GenericType(){});
    getRollingConsensusResponseTypeMap.put(400, new GenericType(){});
    getRollingConsensusResponseTypeMap.put(401, new GenericType(){});
    getRollingConsensusResponseTypeMap.put(403, new GenericType(){});
    getRollingConsensusResponseTypeMap.put(415, new GenericType(){});
    getRollingConsensusResponseTypeMap.put(500, new GenericType(){});
  }

  private static final Map getRollingConsensusForListResponseTypeMap = new HashMap();
  static {
    getRollingConsensusForListResponseTypeMap.put(200, new GenericType(){});
    getRollingConsensusForListResponseTypeMap.put(400, new GenericType(){});
    getRollingConsensusForListResponseTypeMap.put(401, new GenericType(){});
    getRollingConsensusForListResponseTypeMap.put(403, new GenericType(){});
    getRollingConsensusForListResponseTypeMap.put(415, new GenericType(){});
    getRollingConsensusForListResponseTypeMap.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;
  }

  /**
   * Retrieves consensus estimates for a requested list of ids and fixed fiscal periods
   * Returns FactSet Estimates consensus data using fixed fiscal dates. For example, if the company's current unreported year is 12/2020, all data returned by formulas that specify as the period/report basis will be for 12/2005 regardless of what perspective dates (startDate/endDate) are used. The fixed dates are \"locked\" in time and all estimated values are for that explicit date. If you are requesting that the estimated periods can change with the perspective date, please use the rolling-consensus endpoint. 
   * @param ids Security or Entity identifiers. FactSet Identifiers, tickers, CUSIP and SEDOL are accepted input. <p>***ids limit** =  3000 per request*</p> * Make Note - id limit of 3000 for defaults, otherwise the service is limited to a 30 second duration. This can be reached when increasing total number of metrics requested and depth of history. *  (required)
   * @param metrics Requested metrics. Use the /metrics endpoint to return a list of available estimate items. Note, the number of metrics you are allowed to supply is limited to 1 for now. **Top 10** most used metrics are **EPS, SALES, DPS, EBITDA,EBIT, PRICE_TGT, CFPS, BPS, NET_INC, and ASSETS**.  For more details, visit [Online Assistant Page #15034](https://oa.apps.factset.com/pages/15034).  (required)
   * @param startDate Start date for point in time of estimates expressed in YYYY-MM-DD format. (optional)
   * @param endDate End date for point in time of estimates expressed in YYYY-MM-DD format. (optional)
   * @param frequency Controls the frequency of the data returned.   * **D** = Daily   * **W** = Weekly, based on the last day of the week of the start date.   * **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.).         * **AQ** = Quarterly, based on the start date.   * **AY** = Actual Annual, based on the start date.   (optional, default to D)
   * @param fiscalPeriodStart Fiscal period start expressed in absolute date formats. Date that will fall back to most recent completed period during resolution.   * **Fiscal Quarter-end** - YYYY/FQ (e.g., 2019/1F, 2019/2F, 2019/3F, 2019/4F)   * **Fiscal Year-end** - YYYY (e.g. 2019)  (optional)
   * @param fiscalPeriodEnd Fiscal period start expressed in absolute date formats. Date that will fall back to most recent completed period during resolution.   * **Fiscal Quarter-end** - YYYY/FQ (e.g., 2019/1F, 2019/2F, 2019/3F, 2019/4F)   * **Fiscal Year-end** - YYYY (e.g. 2019)  (optional)
   * @param periodicity The periodicity for the estimates requested, allowing you to fetch Quarterly, Semi-Annual, Annual, and NTMA/LTMA Estimates.   * **ANN** - Annual   * **QTR** - Quarterly   * **SEMI** - Semi-Annual    * **NTMA** - Next-Twelve-Months - Time-weighted Annual. Estimates use a percentage of annual estimates from two fiscal years to create an estimate based on the 12-month period. Visit [OA 16614](https://my.apps.factset.com/oa/pages/16614) for detail.   * **LTMA** - Last-Twelve-Months - Time-weighted Annual. Estimates use a percentage of annual estimates from two fiscal years to create an estimate based on the 12-month period. Visit [OA 16614](https://my.apps.factset.com/oa/pages/16614) for detail.     (optional, default to ANN)
   * @param currency Currency code for adjusting the data. Use 'ESTIMATE' as input value for the values in Estimate Currency. For a list of currency ISO codes, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470). (optional)
   * @return ConsensusResponse
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
200 Consensus Estimate 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 ConsensusResponse getFixedConsensus(java.util.List ids, java.util.List metrics, String startDate, String endDate, String frequency, String fiscalPeriodStart, String fiscalPeriodEnd, String periodicity, String currency) throws ApiException { return getFixedConsensusWithHttpInfo(ids, metrics, startDate, endDate, frequency, fiscalPeriodStart, fiscalPeriodEnd, periodicity, currency).getData(); } /** * Retrieves consensus estimates for a requested list of ids and fixed fiscal periods * Returns FactSet Estimates consensus data using fixed fiscal dates. For example, if the company's current unreported year is 12/2020, all data returned by formulas that specify as the period/report basis will be for 12/2005 regardless of what perspective dates (startDate/endDate) are used. The fixed dates are \"locked\" in time and all estimated values are for that explicit date. If you are requesting that the estimated periods can change with the perspective date, please use the rolling-consensus endpoint. * @param ids Security or Entity identifiers. FactSet Identifiers, tickers, CUSIP and SEDOL are accepted input. <p>***ids limit** = 3000 per request*</p> * Make Note - id limit of 3000 for defaults, otherwise the service is limited to a 30 second duration. This can be reached when increasing total number of metrics requested and depth of history. * (required) * @param metrics Requested metrics. Use the /metrics endpoint to return a list of available estimate items. Note, the number of metrics you are allowed to supply is limited to 1 for now. **Top 10** most used metrics are **EPS, SALES, DPS, EBITDA,EBIT, PRICE_TGT, CFPS, BPS, NET_INC, and ASSETS**. For more details, visit [Online Assistant Page #15034](https://oa.apps.factset.com/pages/15034). (required) * @param startDate Start date for point in time of estimates expressed in YYYY-MM-DD format. (optional) * @param endDate End date for point in time of estimates expressed in YYYY-MM-DD format. (optional) * @param frequency Controls the frequency of the data returned. * **D** = Daily * **W** = Weekly, based on the last day of the week of the start date. * **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.). * **AQ** = Quarterly, based on the start date. * **AY** = Actual Annual, based on the start date. (optional, default to D) * @param fiscalPeriodStart Fiscal period start expressed in absolute date formats. Date that will fall back to most recent completed period during resolution. * **Fiscal Quarter-end** - YYYY/FQ (e.g., 2019/1F, 2019/2F, 2019/3F, 2019/4F) * **Fiscal Year-end** - YYYY (e.g. 2019) (optional) * @param fiscalPeriodEnd Fiscal period start expressed in absolute date formats. Date that will fall back to most recent completed period during resolution. * **Fiscal Quarter-end** - YYYY/FQ (e.g., 2019/1F, 2019/2F, 2019/3F, 2019/4F) * **Fiscal Year-end** - YYYY (e.g. 2019) (optional) * @param periodicity The periodicity for the estimates requested, allowing you to fetch Quarterly, Semi-Annual, Annual, and NTMA/LTMA Estimates. * **ANN** - Annual * **QTR** - Quarterly * **SEMI** - Semi-Annual * **NTMA** - Next-Twelve-Months - Time-weighted Annual. Estimates use a percentage of annual estimates from two fiscal years to create an estimate based on the 12-month period. Visit [OA 16614](https://my.apps.factset.com/oa/pages/16614) for detail. * **LTMA** - Last-Twelve-Months - Time-weighted Annual. Estimates use a percentage of annual estimates from two fiscal years to create an estimate based on the 12-month period. Visit [OA 16614](https://my.apps.factset.com/oa/pages/16614) for detail. (optional, default to ANN) * @param currency Currency code for adjusting the data. Use 'ESTIMATE' as input value for the values in Estimate Currency. For a list of currency ISO codes, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470). (optional) * @return ApiResponse<ConsensusResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Consensus Estimate 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 getFixedConsensusWithHttpInfo(java.util.List ids, java.util.List metrics, String startDate, String endDate, String frequency, String fiscalPeriodStart, String fiscalPeriodEnd, 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 getFixedConsensus"); } // verify the required parameter 'metrics' is set if (metrics == null) { throw new ApiException(400, "Missing the required parameter 'metrics' when calling getFixedConsensus"); } // create path and map variables String localVarPath = "/factset-estimates/v2/fixed-consensus"; // 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("", "fiscalPeriodStart", fiscalPeriodStart)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "fiscalPeriodEnd", fiscalPeriodEnd)); 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< ConsensusResponse > apiResponse = apiClient.invokeAPI("ConsensusApi.getFixedConsensus", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, getFixedConsensusResponseTypeMap, false); return apiResponse; } /** * FactSet consensus estimates for fixed fiscal periods * Returns FactSet Estimates consensus data using fixed fiscal dates. For example, if the company's current unreported year is 12/2020, all data returned by formulas that specify as the period/report basis will be for 12/2005 regardless of what perspective dates (startDate/endDate) are used. The fixed dates are \"locked\" in time and all estimated values are for that explicit date. If you are requesting that the estimated periods can change with the perspective date, please use the rolling-consensus endpoint. * @param fixedConsensusRequest Request object for Estimate Data Items. (required) * @return ConsensusResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Estimate 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 ConsensusResponse getFixedConsensusForList(FixedConsensusRequest fixedConsensusRequest) throws ApiException { return getFixedConsensusForListWithHttpInfo(fixedConsensusRequest).getData(); } /** * FactSet consensus estimates for fixed fiscal periods * Returns FactSet Estimates consensus data using fixed fiscal dates. For example, if the company's current unreported year is 12/2020, all data returned by formulas that specify as the period/report basis will be for 12/2005 regardless of what perspective dates (startDate/endDate) are used. The fixed dates are \"locked\" in time and all estimated values are for that explicit date. If you are requesting that the estimated periods can change with the perspective date, please use the rolling-consensus endpoint. * @param fixedConsensusRequest Request object for Estimate Data Items. (required) * @return ApiResponse<ConsensusResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Estimate 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 getFixedConsensusForListWithHttpInfo(FixedConsensusRequest fixedConsensusRequest) throws ApiException { Object localVarPostBody = fixedConsensusRequest; // verify the required parameter 'fixedConsensusRequest' is set if (fixedConsensusRequest == null) { throw new ApiException(400, "Missing the required parameter 'fixedConsensusRequest' when calling getFixedConsensusForList"); } // create path and map variables String localVarPath = "/factset-estimates/v2/fixed-consensus"; // 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< ConsensusResponse > apiResponse = apiClient.invokeAPI("ConsensusApi.getFixedConsensusForList", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, getFixedConsensusForListResponseTypeMap, false); return apiResponse; } /** * Retrieves consensus estimates for a requested list of ids and rolling fiscal periods. * Returns FactSet Estimates consensus data using rolling fiscal dates. <p>The rolling behavior causes fiscal year to automatically roll from one year to the next as the historical perspective date changes. The fiscal period rolls forward as of each period end. This endpoint is optimized to allow the request to simply include a relative fiscal period (e.g. use relativeFiscalStart integer 1 and periodicity ANN for next unreported fiscal year end), and then see what the consensus thought the \"next fiscal year\" estimates were through time as you \"roll\" back your perspective dates. This differs from locking down an absolute estimate period such as explicitly stating Fiscal Year 2019. This can be done in the fixed-consensus endpoint.</p> * @param ids Security or Entity identifiers. FactSet Identifiers, tickers, CUSIP and SEDOL are accepted input. <p>***ids limit** = 3000 per request*</p> * Make Note - id limit of 3000 for defaults, otherwise the service is limited to a 30 second duration. This can be reached when increasing total number of metrics requested and depth of history. * (required) * @param metrics Requested metrics. Use the /metrics endpoint to return a list of available estimate items. Note, the number of metrics you are allowed to supply is limited to 1 for now. **Top 10** most used metrics are **EPS, SALES, DPS, EBITDA,EBIT, PRICE_TGT, CFPS, BPS, NET_INC, and ASSETS**. For more details, visit [Online Assistant Page #15034](https://oa.apps.factset.com/pages/15034). (required) * @param startDate Start date for point in time of estimates expressed in YYYY-MM-DD format. (optional) * @param endDate End date for point in time of estimates expressed in YYYY-MM-DD format. (optional) * @param frequency Controls the frequency of the data returned. * **D** = Daily * **W** = Weekly, based on the last day of the week of the start date. * **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.). * **AQ** = Quarterly, based on the start date. * **AY** = Actual Annual, based on the start date. (optional, default to D) * @param relativeFiscalStart Relative fiscal period, expressed as an integer, used to filter results. This is combined with the periodicity parameter to specify a relative estimate period. For example, set to 1 and periodicity to ANN to ask for relative Fiscal Year 1 (FY1). (optional) * @param relativeFiscalEnd Relative fiscal period, expressed as an integer, used to filter results. This is combined with the periodicity parameter to specify a relative estimate period. For example, set to 2 and periodicity to ANN to ask for relative Fiscal Year 1 (FY2). (optional) * @param periodicity The periodicity for the estimates requested, allowing you to fetch Quarterly, Semi-Annual, Annual, and NTMA/LTMA Estimates. * **ANN** - Annual * **QTR** - Quarterly * **SEMI** - Semi-Annual * **NTMA** - Next-Twelve-Months - Time-weighted Annual. Estimates use a percentage of annual estimates from two fiscal years to create an estimate based on the 12-month period. Visit [OA 16614](https://my.apps.factset.com/oa/pages/16614) for detail. * **LTMA** - Last-Twelve-Months - Time-weighted Annual. Estimates use a percentage of annual estimates from two fiscal years to create an estimate based on the 12-month period. Visit [OA 16614](https://my.apps.factset.com/oa/pages/16614) for detail. (optional, default to ANN) * @param currency Currency code for adjusting the data. Use 'ESTIMATE' as input value for the values in Estimate Currency. For a list of currency ISO codes, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470). (optional) * @return ConsensusResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Estimate 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 ConsensusResponse getRollingConsensus(java.util.List ids, java.util.List metrics, String startDate, String endDate, String frequency, Integer relativeFiscalStart, Integer relativeFiscalEnd, String periodicity, String currency) throws ApiException { return getRollingConsensusWithHttpInfo(ids, metrics, startDate, endDate, frequency, relativeFiscalStart, relativeFiscalEnd, periodicity, currency).getData(); } /** * Retrieves consensus estimates for a requested list of ids and rolling fiscal periods. * Returns FactSet Estimates consensus data using rolling fiscal dates. <p>The rolling behavior causes fiscal year to automatically roll from one year to the next as the historical perspective date changes. The fiscal period rolls forward as of each period end. This endpoint is optimized to allow the request to simply include a relative fiscal period (e.g. use relativeFiscalStart integer 1 and periodicity ANN for next unreported fiscal year end), and then see what the consensus thought the \"next fiscal year\" estimates were through time as you \"roll\" back your perspective dates. This differs from locking down an absolute estimate period such as explicitly stating Fiscal Year 2019. This can be done in the fixed-consensus endpoint.</p> * @param ids Security or Entity identifiers. FactSet Identifiers, tickers, CUSIP and SEDOL are accepted input. <p>***ids limit** = 3000 per request*</p> * Make Note - id limit of 3000 for defaults, otherwise the service is limited to a 30 second duration. This can be reached when increasing total number of metrics requested and depth of history. * (required) * @param metrics Requested metrics. Use the /metrics endpoint to return a list of available estimate items. Note, the number of metrics you are allowed to supply is limited to 1 for now. **Top 10** most used metrics are **EPS, SALES, DPS, EBITDA,EBIT, PRICE_TGT, CFPS, BPS, NET_INC, and ASSETS**. For more details, visit [Online Assistant Page #15034](https://oa.apps.factset.com/pages/15034). (required) * @param startDate Start date for point in time of estimates expressed in YYYY-MM-DD format. (optional) * @param endDate End date for point in time of estimates expressed in YYYY-MM-DD format. (optional) * @param frequency Controls the frequency of the data returned. * **D** = Daily * **W** = Weekly, based on the last day of the week of the start date. * **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.). * **AQ** = Quarterly, based on the start date. * **AY** = Actual Annual, based on the start date. (optional, default to D) * @param relativeFiscalStart Relative fiscal period, expressed as an integer, used to filter results. This is combined with the periodicity parameter to specify a relative estimate period. For example, set to 1 and periodicity to ANN to ask for relative Fiscal Year 1 (FY1). (optional) * @param relativeFiscalEnd Relative fiscal period, expressed as an integer, used to filter results. This is combined with the periodicity parameter to specify a relative estimate period. For example, set to 2 and periodicity to ANN to ask for relative Fiscal Year 1 (FY2). (optional) * @param periodicity The periodicity for the estimates requested, allowing you to fetch Quarterly, Semi-Annual, Annual, and NTMA/LTMA Estimates. * **ANN** - Annual * **QTR** - Quarterly * **SEMI** - Semi-Annual * **NTMA** - Next-Twelve-Months - Time-weighted Annual. Estimates use a percentage of annual estimates from two fiscal years to create an estimate based on the 12-month period. Visit [OA 16614](https://my.apps.factset.com/oa/pages/16614) for detail. * **LTMA** - Last-Twelve-Months - Time-weighted Annual. Estimates use a percentage of annual estimates from two fiscal years to create an estimate based on the 12-month period. Visit [OA 16614](https://my.apps.factset.com/oa/pages/16614) for detail. (optional, default to ANN) * @param currency Currency code for adjusting the data. Use 'ESTIMATE' as input value for the values in Estimate Currency. For a list of currency ISO codes, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470). (optional) * @return ApiResponse<ConsensusResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Estimate 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 getRollingConsensusWithHttpInfo(java.util.List ids, java.util.List metrics, String startDate, String endDate, String frequency, Integer relativeFiscalStart, Integer relativeFiscalEnd, 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 getRollingConsensus"); } // verify the required parameter 'metrics' is set if (metrics == null) { throw new ApiException(400, "Missing the required parameter 'metrics' when calling getRollingConsensus"); } // create path and map variables String localVarPath = "/factset-estimates/v2/rolling-consensus"; // 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("", "relativeFiscalStart", relativeFiscalStart)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "relativeFiscalEnd", relativeFiscalEnd)); 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< ConsensusResponse > apiResponse = apiClient.invokeAPI("ConsensusApi.getRollingConsensus", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, getRollingConsensusResponseTypeMap, false); return apiResponse; } /** * Retrieves consensus estimates for a requested list of ids and rolling fiscal periods * Returns FactSet Estimates consensus data using rolling fiscal dates. <p>The rolling behavior causes fiscal year to automatically roll from one year to the next as the historical perspective date changes. The fiscal period rolls forward as of each period end. This endpoint is optimized to allow the request to simply include a relative fiscal period (e.g. use relativeFiscalStart integer 1 and periodicity ANN for next unreported fiscal year end), and then see what the consensus thought the \"next fiscal year\" estimates were through time as you \"roll\" back your perspective dates. This differs from locking down an absolute estimate period such as explicitly stating Fiscal Year 2019. This can be done in the fixed-consensus endpoint.</p> * @param rollingConsensusRequest Request object for Rolling Conensus estimates. (required) * @return ConsensusResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Rolling Conensus Estimate 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 ConsensusResponse getRollingConsensusForList(RollingConsensusRequest rollingConsensusRequest) throws ApiException { return getRollingConsensusForListWithHttpInfo(rollingConsensusRequest).getData(); } /** * Retrieves consensus estimates for a requested list of ids and rolling fiscal periods * Returns FactSet Estimates consensus data using rolling fiscal dates. <p>The rolling behavior causes fiscal year to automatically roll from one year to the next as the historical perspective date changes. The fiscal period rolls forward as of each period end. This endpoint is optimized to allow the request to simply include a relative fiscal period (e.g. use relativeFiscalStart integer 1 and periodicity ANN for next unreported fiscal year end), and then see what the consensus thought the \"next fiscal year\" estimates were through time as you \"roll\" back your perspective dates. This differs from locking down an absolute estimate period such as explicitly stating Fiscal Year 2019. This can be done in the fixed-consensus endpoint.</p> * @param rollingConsensusRequest Request object for Rolling Conensus estimates. (required) * @return ApiResponse<ConsensusResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Rolling Conensus Estimate 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 getRollingConsensusForListWithHttpInfo(RollingConsensusRequest rollingConsensusRequest) throws ApiException { Object localVarPostBody = rollingConsensusRequest; // verify the required parameter 'rollingConsensusRequest' is set if (rollingConsensusRequest == null) { throw new ApiException(400, "Missing the required parameter 'rollingConsensusRequest' when calling getRollingConsensusForList"); } // create path and map variables String localVarPath = "/factset-estimates/v2/rolling-consensus"; // 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< ConsensusResponse > apiResponse = apiClient.invokeAPI("ConsensusApi.getRollingConsensusForList", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, getRollingConsensusForListResponseTypeMap, false); return apiResponse; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy