Class AccountActivitiesApi

java.lang.Object
markets.alpaca.client.openapi.trading.api.AccountActivitiesApi

public class AccountActivitiesApi extends Object
Generated client for AccountActivitiesApi 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

  • getAccountActivities: Retrieve Account Activities
  • getAccountActivitiesByActivityType: Retrieve Account Activities of Specific Type
  • Constructor Details

    • AccountActivitiesApi

      public AccountActivitiesApi()
    • AccountActivitiesApi

      public AccountActivitiesApi(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)
    • getAccountActivitiesCall

      public okhttp3.Call getAccountActivitiesCall(@Nullable List<ActivityType> activityTypes, @Nullable String category, @Nullable OffsetDateTime date, @Nullable OffsetDateTime until, @Nullable OffsetDateTime after, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken, ApiCallback _callback) throws ApiException
      Build call for getAccountActivities
      Parameters:
      activityTypes - A comma-separated list of activity types used to filter the results. (optional)
      category - The activity category. Cannot be used with \"activity_types\" parameter. (optional)
      date - Filter activities by their creation date (created_at), not the activity's settlement date. For non-trade activities such as fees, the creation date is typically the day after the trade date (in UTC). Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      until - Get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      after - Get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      direction - The chronological order of response based on the activity datetime. (optional, default to desc)
      pageSize - The maximum number of entries to return in the response. (optional, default to 100)
      pageToken - Token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results. (optional)
      _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 returns an array of Account activities -
    • getAccountActivities

      public List<GetAccountActivities200ResponseInner> getAccountActivities(@Nullable List<ActivityType> activityTypes, @Nullable String category, @Nullable OffsetDateTime date, @Nullable OffsetDateTime until, @Nullable OffsetDateTime after, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken) throws ApiException
      Retrieve Account Activities Returns a list of activities Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the last item on your current page of results. For example, if the ID of the last activity in your first response is `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you would pass that value as `page_token` to retrieve the next page of results.
      Parameters:
      activityTypes - A comma-separated list of activity types used to filter the results. (optional)
      category - The activity category. Cannot be used with \"activity_types\" parameter. (optional)
      date - Filter activities by their creation date (created_at), not the activity's settlement date. For non-trade activities such as fees, the creation date is typically the day after the trade date (in UTC). Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      until - Get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      after - Get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      direction - The chronological order of response based on the activity datetime. (optional, default to desc)
      pageSize - The maximum number of entries to return in the response. (optional, default to 100)
      pageToken - Token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results. (optional)
      Returns:
      List<GetAccountActivities200ResponseInner>
      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 returns an array of Account activities -
    • getAccountActivitiesWithHttpInfo

      public ApiResponse<List<GetAccountActivities200ResponseInner>> getAccountActivitiesWithHttpInfo(@Nullable List<ActivityType> activityTypes, @Nullable String category, @Nullable OffsetDateTime date, @Nullable OffsetDateTime until, @Nullable OffsetDateTime after, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken) throws ApiException
      Retrieve Account Activities Returns a list of activities Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the last item on your current page of results. For example, if the ID of the last activity in your first response is `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you would pass that value as `page_token` to retrieve the next page of results.
      Parameters:
      activityTypes - A comma-separated list of activity types used to filter the results. (optional)
      category - The activity category. Cannot be used with \"activity_types\" parameter. (optional)
      date - Filter activities by their creation date (created_at), not the activity's settlement date. For non-trade activities such as fees, the creation date is typically the day after the trade date (in UTC). Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      until - Get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      after - Get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      direction - The chronological order of response based on the activity datetime. (optional, default to desc)
      pageSize - The maximum number of entries to return in the response. (optional, default to 100)
      pageToken - Token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results. (optional)
      Returns:
      ApiResponse<List<GetAccountActivities200ResponseInner>>
      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 returns an array of Account activities -
    • getAccountActivitiesAsync

      public okhttp3.Call getAccountActivitiesAsync(@Nullable List<ActivityType> activityTypes, @Nullable String category, @Nullable OffsetDateTime date, @Nullable OffsetDateTime until, @Nullable OffsetDateTime after, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken, ApiCallback<List<GetAccountActivities200ResponseInner>> _callback) throws ApiException
      Retrieve Account Activities (asynchronously) Returns a list of activities Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the last item on your current page of results. For example, if the ID of the last activity in your first response is `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you would pass that value as `page_token` to retrieve the next page of results.
      Parameters:
      activityTypes - A comma-separated list of activity types used to filter the results. (optional)
      category - The activity category. Cannot be used with \"activity_types\" parameter. (optional)
      date - Filter activities by their creation date (created_at), not the activity's settlement date. For non-trade activities such as fees, the creation date is typically the day after the trade date (in UTC). Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      until - Get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      after - Get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      direction - The chronological order of response based on the activity datetime. (optional, default to desc)
      pageSize - The maximum number of entries to return in the response. (optional, default to 100)
      pageToken - Token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results. (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
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 returns an array of Account activities -
    • getAccountActivitiesByActivityTypeCall

      public okhttp3.Call getAccountActivitiesByActivityTypeCall(@Nonnull String activityType, @Nullable OffsetDateTime date, @Nullable OffsetDateTime until, @Nullable OffsetDateTime after, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken, ApiCallback _callback) throws ApiException
      Build call for getAccountActivitiesByActivityType
      Parameters:
      activityType - The activity type you want to view entries for. A list of valid activity types can be found at the bottom of this page. (required)
      date - Filter activities by their creation date (created_at), not the activity's settlement date. For non-trade activities such as fees, the creation date is typically the day after the trade date (in UTC). Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      until - Get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      after - Get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      direction - The chronological order of response based on the activity datetime. (optional, default to desc)
      pageSize - The maximum number of entries to return in the response. (optional, default to 100)
      pageToken - Token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results. (optional)
      _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 returns an array of Account activities -
    • getAccountActivitiesByActivityType

      public List<GetAccountActivitiesByActivityType200ResponseInner> getAccountActivitiesByActivityType(@Nonnull String activityType, @Nullable OffsetDateTime date, @Nullable OffsetDateTime until, @Nullable OffsetDateTime after, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken) throws ApiException
      Retrieve Account Activities of Specific Type Returns account activity entries for a specific type of activity.
      Parameters:
      activityType - The activity type you want to view entries for. A list of valid activity types can be found at the bottom of this page. (required)
      date - Filter activities by their creation date (created_at), not the activity's settlement date. For non-trade activities such as fees, the creation date is typically the day after the trade date (in UTC). Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      until - Get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      after - Get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      direction - The chronological order of response based on the activity datetime. (optional, default to desc)
      pageSize - The maximum number of entries to return in the response. (optional, default to 100)
      pageToken - Token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results. (optional)
      Returns:
      List<GetAccountActivitiesByActivityType200ResponseInner>
      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 returns an array of Account activities -
    • getAccountActivitiesByActivityTypeWithHttpInfo

      public ApiResponse<List<GetAccountActivitiesByActivityType200ResponseInner>> getAccountActivitiesByActivityTypeWithHttpInfo(@Nonnull String activityType, @Nullable OffsetDateTime date, @Nullable OffsetDateTime until, @Nullable OffsetDateTime after, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken) throws ApiException
      Retrieve Account Activities of Specific Type Returns account activity entries for a specific type of activity.
      Parameters:
      activityType - The activity type you want to view entries for. A list of valid activity types can be found at the bottom of this page. (required)
      date - Filter activities by their creation date (created_at), not the activity's settlement date. For non-trade activities such as fees, the creation date is typically the day after the trade date (in UTC). Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      until - Get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      after - Get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      direction - The chronological order of response based on the activity datetime. (optional, default to desc)
      pageSize - The maximum number of entries to return in the response. (optional, default to 100)
      pageToken - Token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results. (optional)
      Returns:
      ApiResponse<List<GetAccountActivitiesByActivityType200ResponseInner>>
      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 returns an array of Account activities -
    • getAccountActivitiesByActivityTypeAsync

      public okhttp3.Call getAccountActivitiesByActivityTypeAsync(@Nonnull String activityType, @Nullable OffsetDateTime date, @Nullable OffsetDateTime until, @Nullable OffsetDateTime after, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken, ApiCallback<List<GetAccountActivitiesByActivityType200ResponseInner>> _callback) throws ApiException
      Retrieve Account Activities of Specific Type (asynchronously) Returns account activity entries for a specific type of activity.
      Parameters:
      activityType - The activity type you want to view entries for. A list of valid activity types can be found at the bottom of this page. (required)
      date - Filter activities by their creation date (created_at), not the activity's settlement date. For non-trade activities such as fees, the creation date is typically the day after the trade date (in UTC). Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      until - Get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      after - Get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported. (optional)
      direction - The chronological order of response based on the activity datetime. (optional, default to desc)
      pageSize - The maximum number of entries to return in the response. (optional, default to 100)
      pageToken - Token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results. (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
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 returns an array of Account activities -