Class IndexApi

java.lang.Object
markets.alpaca.client.openapi.data.api.IndexApi

public class IndexApi extends Object
Generated client for IndexApi operations.

This class is generated from the configured OpenAPI spec. Operation method Javadocs include OAS summaries, descriptions, parameters, return types, response details, and external documentation links when present in the spec.

Operations

  • indexLatestValues: Latest values for indices
  • indexValues: Historical values for indices
  • Constructor Details

    • IndexApi

      public IndexApi()
    • IndexApi

      public IndexApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • indexLatestValuesCall

      public okhttp3.Call indexLatestValuesCall(@Nonnull String symbols, ApiCallback _callback) throws ApiException
      Build call for indexLatestValues
      Parameters:
      symbols - A comma-separated list of index symbols. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. -
      403 The requested resource is forbidden. -
      429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
    • indexLatestValues

      public IndexLatestValuesResp indexLatestValues(@Nonnull String symbols) throws ApiException
      Latest values for indices Get the latest values for the given indices.
      Parameters:
      symbols - A comma-separated list of index symbols. (required)
      Returns:
      IndexLatestValuesResp
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. -
      403 The requested resource is forbidden. -
      429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
    • indexLatestValuesWithHttpInfo

      public ApiResponse<IndexLatestValuesResp> indexLatestValuesWithHttpInfo(@Nonnull String symbols) throws ApiException
      Latest values for indices Get the latest values for the given indices.
      Parameters:
      symbols - A comma-separated list of index symbols. (required)
      Returns:
      ApiResponse<IndexLatestValuesResp>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. -
      403 The requested resource is forbidden. -
      429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
    • indexLatestValuesAsync

      public okhttp3.Call indexLatestValuesAsync(@Nonnull String symbols, ApiCallback<IndexLatestValuesResp> _callback) throws ApiException
      Latest values for indices (asynchronously) Get the latest values for the given indices.
      Parameters:
      symbols - A comma-separated list of index symbols. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. -
      403 The requested resource is forbidden. -
      429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
    • indexValuesCall

      public okhttp3.Call indexValuesCall(@Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort, ApiCallback _callback) throws ApiException
      Build call for indexValues
      Parameters:
      symbols - A comma-separated list of index symbols. (required)
      start - The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)
      end - The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)
      limit - The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)
      pageToken - The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)
      sort - Sort data in ascending or descending order. (optional, default to asc)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. -
      403 The requested resource is forbidden. -
      429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
    • indexValues

      public IndexValuesResp indexValues(@Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort) throws ApiException
      Historical values for indices Get historical values for the given indices in the given time interval.
      Parameters:
      symbols - A comma-separated list of index symbols. (required)
      start - The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)
      end - The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)
      limit - The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)
      pageToken - The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)
      sort - Sort data in ascending or descending order. (optional, default to asc)
      Returns:
      IndexValuesResp
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. -
      403 The requested resource is forbidden. -
      429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
    • indexValuesWithHttpInfo

      public ApiResponse<IndexValuesResp> indexValuesWithHttpInfo(@Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort) throws ApiException
      Historical values for indices Get historical values for the given indices in the given time interval.
      Parameters:
      symbols - A comma-separated list of index symbols. (required)
      start - The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)
      end - The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)
      limit - The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)
      pageToken - The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)
      sort - Sort data in ascending or descending order. (optional, default to asc)
      Returns:
      ApiResponse<IndexValuesResp>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. -
      403 The requested resource is forbidden. -
      429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
    • indexValuesAsync

      public okhttp3.Call indexValuesAsync(@Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort, ApiCallback<IndexValuesResp> _callback) throws ApiException
      Historical values for indices (asynchronously) Get historical values for the given indices in the given time interval.
      Parameters:
      symbols - A comma-separated list of index symbols. (required)
      start - The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)
      end - The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)
      limit - The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)
      pageToken - The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)
      sort - Sort data in ascending or descending order. (optional, default to asc)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. -
      403 The requested resource is forbidden. -
      429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
      * X-RateLimit-Remaining -
      * X-RateLimit-Reset -
      500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -