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

com.factset.sdk.FactSetTrading.api.OrdersApi Maven / Gradle / Ivy

package com.factset.sdk.FactSetTrading.api;

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

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

import com.factset.sdk.FactSetTrading.models.ClientErrorResponse;
import com.factset.sdk.FactSetTrading.models.EMSCancelOrdersRoot;
import com.factset.sdk.FactSetTrading.models.EMSOrdersCreateResponseRoot;
import com.factset.sdk.FactSetTrading.models.EMSOrdersRoot;
import com.factset.sdk.FactSetTrading.models.EMSReplaceOrdersRoot;

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class OrdersApi {
  private ApiClient apiClient;

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

  public OrdersApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

    private static final Map cancelResponseTypeMap = new HashMap();
  static {
    cancelResponseTypeMap.put(200, new GenericType(){});
    cancelResponseTypeMap.put(400, new GenericType(){});
  }
  private static final Map createResponseTypeMap = new HashMap();
  static {
    createResponseTypeMap.put(200, new GenericType(){});
    createResponseTypeMap.put(400, new GenericType(){});
  }
  private static final Map replaceResponseTypeMap = new HashMap();
  static {
    replaceResponseTypeMap.put(200, new GenericType(){});
    replaceResponseTypeMap.put(400, 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;
  }

  /**
   * Cancel the orders on EMS system.
   * This endpoint takes the list of orders to be cancelled on the EMS system.
   * @param emSCancelOrdersRoot  (optional)
   * @return EMSOrdersCreateResponseRoot
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
200 Expected response, returns the list of order ids. -
400 Invalid post body parameters. -
401 Missing or invalid authentication. -
403 User is forbidden with current credentials -
415 Missing/Invalid Content-Type header. Header needs to be set to application/json. -
429 Rate limit reached. Wait before sending further requests. -
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. -
503 Request timed out. Retry the request in sometime. -
*/ public EMSOrdersCreateResponseRoot cancel(EMSCancelOrdersRoot emSCancelOrdersRoot) throws ApiException { return cancelWithHttpInfo(emSCancelOrdersRoot).getData(); } /** * Cancel the orders on EMS system. * This endpoint takes the list of orders to be cancelled on the EMS system. * @param emSCancelOrdersRoot (optional) * @return ApiResponse<EMSOrdersCreateResponseRoot> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Expected response, returns the list of order ids. -
400 Invalid post body parameters. -
401 Missing or invalid authentication. -
403 User is forbidden with current credentials -
415 Missing/Invalid Content-Type header. Header needs to be set to application/json. -
429 Rate limit reached. Wait before sending further requests. -
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. -
503 Request timed out. Retry the request in sometime. -
*/ public ApiResponse cancelWithHttpInfo(EMSCancelOrdersRoot emSCancelOrdersRoot) throws ApiException { Object localVarPostBody = emSCancelOrdersRoot; // create path and map variables String localVarPath = "/trading/ems/v1/orders/cancel"; // 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< EMSOrdersCreateResponseRoot > apiResponse = apiClient.invokeAPI("OrdersApi.cancel", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, cancelResponseTypeMap, false); return apiResponse; } /** * Send orders to EMS for execution. * This endpoint takes the list of orders and place them on EMS for execution. * @param emSOrdersRoot (optional) * @return EMSOrdersCreateResponseRoot * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Expected response, returns the list of orders. -
400 Invalid post body parameters. -
401 Missing or invalid authentication. -
403 User is forbidden with current credentials -
415 Missing/Invalid Content-Type header. Header needs to be set to application/json. -
429 Rate limit reached. Wait before sending further requests. -
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. -
503 Request timed out. Retry the request in sometime. -
*/ public EMSOrdersCreateResponseRoot create(EMSOrdersRoot emSOrdersRoot) throws ApiException { return createWithHttpInfo(emSOrdersRoot).getData(); } /** * Send orders to EMS for execution. * This endpoint takes the list of orders and place them on EMS for execution. * @param emSOrdersRoot (optional) * @return ApiResponse<EMSOrdersCreateResponseRoot> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Expected response, returns the list of orders. -
400 Invalid post body parameters. -
401 Missing or invalid authentication. -
403 User is forbidden with current credentials -
415 Missing/Invalid Content-Type header. Header needs to be set to application/json. -
429 Rate limit reached. Wait before sending further requests. -
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. -
503 Request timed out. Retry the request in sometime. -
*/ public ApiResponse createWithHttpInfo(EMSOrdersRoot emSOrdersRoot) throws ApiException { Object localVarPostBody = emSOrdersRoot; // create path and map variables String localVarPath = "/trading/ems/v1/orders/create"; // 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< EMSOrdersCreateResponseRoot > apiResponse = apiClient.invokeAPI("OrdersApi.create", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, createResponseTypeMap, false); return apiResponse; } /** * Replace the orders on EMS system. * This endpoint takes the list of orders to be replaced on the EMS system. * @param emSReplaceOrdersRoot (optional) * @return EMSOrdersCreateResponseRoot * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Expected response, returns the list of order ids. -
400 Invalid post body parameters. -
401 Missing or invalid authentication. -
403 User is forbidden with current credentials -
415 Missing/Invalid Content-Type header. Header needs to be set to application/json. -
429 Rate limit reached. Wait before sending further requests. -
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. -
503 Request timed out. Retry the request in sometime. -
*/ public EMSOrdersCreateResponseRoot replace(EMSReplaceOrdersRoot emSReplaceOrdersRoot) throws ApiException { return replaceWithHttpInfo(emSReplaceOrdersRoot).getData(); } /** * Replace the orders on EMS system. * This endpoint takes the list of orders to be replaced on the EMS system. * @param emSReplaceOrdersRoot (optional) * @return ApiResponse<EMSOrdersCreateResponseRoot> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Expected response, returns the list of order ids. -
400 Invalid post body parameters. -
401 Missing or invalid authentication. -
403 User is forbidden with current credentials -
415 Missing/Invalid Content-Type header. Header needs to be set to application/json. -
429 Rate limit reached. Wait before sending further requests. -
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. -
503 Request timed out. Retry the request in sometime. -
*/ public ApiResponse replaceWithHttpInfo(EMSReplaceOrdersRoot emSReplaceOrdersRoot) throws ApiException { Object localVarPostBody = emSReplaceOrdersRoot; // create path and map variables String localVarPath = "/trading/ems/v1/orders/replace"; // 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< EMSOrdersCreateResponseRoot > apiResponse = apiClient.invokeAPI("OrdersApi.replace", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, replaceResponseTypeMap, false); return apiResponse; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy