java.lang.Object
net.jacobpeterson.alpaca.openapi.marketdata.api.NewsApi

public class NewsApi extends Object
  • Constructor Details

    • NewsApi

      public NewsApi()
    • NewsApi

      public NewsApi(ApiClient apiClient)
  • Method Details

    • newsCall

      protected okhttp3.Call newsCall(OffsetDateTime start, OffsetDateTime end, String sort, String symbols, Integer limit, Boolean includeContent, Boolean excludeContentless, String pageToken, ApiCallback _callback) throws ApiException
      Build call for news
      Parameters:
      start - The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. If missing, the default value is the beginning of the current day. (optional)
      end - The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. If missing, the default value is the current time. (optional)
      sort - Sort articles by updated date. (optional, default to desc)
      symbols - The comma-separated list of symbols to query news for. (optional)
      limit - Limit of news items to be returned for given page. (optional)
      includeContent - Boolean indicator to include content for news articles (if available) (optional)
      excludeContentless - Boolean indicator to exclude news articles that do not contain content (optional)
      pageToken - Pagination token to continue from. The value to pass here is returned in specific requests when more data is available than the request limit allows. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • news

      public NewsResp news(OffsetDateTime start, OffsetDateTime end, String sort, String symbols, Integer limit, Boolean includeContent, Boolean excludeContentless, String pageToken) throws ApiException
      News articles Returns latest news articles across stocks and crypto. By default returns latest 10 news articles.
      Parameters:
      start - The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. If missing, the default value is the beginning of the current day. (optional)
      end - The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. If missing, the default value is the current time. (optional)
      sort - Sort articles by updated date. (optional, default to desc)
      symbols - The comma-separated list of symbols to query news for. (optional)
      limit - Limit of news items to be returned for given page. (optional)
      includeContent - Boolean indicator to include content for news articles (if available) (optional)
      excludeContentless - Boolean indicator to exclude news articles that do not contain content (optional)
      pageToken - Pagination token to continue from. The value to pass here is returned in specific requests when more data is available than the request limit allows. (optional)
      Returns:
      NewsResp
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • newsWithHttpInfo

      protected ApiResponse<NewsResp> newsWithHttpInfo(OffsetDateTime start, OffsetDateTime end, String sort, String symbols, Integer limit, Boolean includeContent, Boolean excludeContentless, String pageToken) throws ApiException
      News articles Returns latest news articles across stocks and crypto. By default returns latest 10 news articles.
      Parameters:
      start - The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. If missing, the default value is the beginning of the current day. (optional)
      end - The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. If missing, the default value is the current time. (optional)
      sort - Sort articles by updated date. (optional, default to desc)
      symbols - The comma-separated list of symbols to query news for. (optional)
      limit - Limit of news items to be returned for given page. (optional)
      includeContent - Boolean indicator to include content for news articles (if available) (optional)
      excludeContentless - Boolean indicator to exclude news articles that do not contain content (optional)
      pageToken - Pagination token to continue from. The value to pass here is returned in specific requests when more data is available than the request limit allows. (optional)
      Returns:
      ApiResponse<NewsResp>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • newsAsync

      protected okhttp3.Call newsAsync(OffsetDateTime start, OffsetDateTime end, String sort, String symbols, Integer limit, Boolean includeContent, Boolean excludeContentless, String pageToken, ApiCallback<NewsResp> _callback) throws ApiException
      News articles (asynchronously) Returns latest news articles across stocks and crypto. By default returns latest 10 news articles.
      Parameters:
      start - The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. If missing, the default value is the beginning of the current day. (optional)
      end - The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. If missing, the default value is the current time. (optional)
      sort - Sort articles by updated date. (optional, default to desc)
      symbols - The comma-separated list of symbols to query news for. (optional)
      limit - Limit of news items to be returned for given page. (optional)
      includeContent - Boolean indicator to include content for news articles (if available) (optional)
      excludeContentless - Boolean indicator to exclude news articles that do not contain content (optional)
      pageToken - Pagination token to continue from. The value to pass here is returned in specific requests when more data is available than the request limit allows. (optional)
      _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