Class ReportingApi

java.lang.Object
markets.alpaca.client.openapi.broker.api.ReportingApi

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

  • getV1GetEodCashInterestReport: Retrieve EOD Cash Interest Details
  • getV1ReportingEodAggregatePositions: Retrieve Aggregate Positions
  • getV1ReportingEodPositions: Retrieve EOD Positions
  • Constructor Details

    • ReportingApi

      public ReportingApi()
    • ReportingApi

      public ReportingApi(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)
    • getV1GetEodCashInterestReportCall

      public okhttp3.Call getV1GetEodCashInterestReportCall(@Nullable UUID accountId, @Nullable LocalDate date, @Nullable LocalDate after, @Nullable LocalDate before, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken, ApiCallback _callback) throws ApiException
      Build call for getV1GetEodCashInterestReport
      Parameters:
      accountId - Account globally unique identifier. If not provided, the report will be generated for all accounts. (optional)
      date - A date in the format YYYY-MM-DD. If not provided, the report will be generated for the most recent date this report is available. (optional)
      after - A date in the format YYYY-MM-DD, valid only if account_id is provided and date is not provided. If not provided, this will use `before` value. If neither is provided the most recent available date is used for both `before` and `after`. (optional)
      before - A date in the format YYYY-MM-DD, valid only if account_id is provided and date is not provided. If not provided, this will use the most recent available date. (optional)
      direction - The direction to use for sorting responses, either `asc` or `desc`. Only valid for account_id queries, for which only sorting by date is supported. Defaults to `desc`. (optional)
      pageSize - The page size, used for paginating responses. Defaults to 1000, with a maximum of 10,000. (optional, default to 1000)
      pageToken - A token used to retrieve the next page for paginated queries. If provided the response will begin at the next page of the results for the response from which the `next_page_token` is used. (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 Successful response, returns a list of daily interest accruals and an optional next page token. -
      400 A client error occurred. Please check the provided request parameters and try again. -
      401 Unauthorized. Please check your API key and try again. -
      429 Too many requests. Please wait a moment and try again. -
      500 A server error occurred. Please contact Alpaca. -
    • getV1GetEodCashInterestReport

      public EoDCashInterestReportResponse getV1GetEodCashInterestReport(@Nullable UUID accountId, @Nullable LocalDate date, @Nullable LocalDate after, @Nullable LocalDate before, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken) throws ApiException
      Retrieve EOD Cash Interest Details This API retrieves a list of cash interest details for the given date(s) for a single account or all accounts. End-of-day (EOD) details are typically accessible after 8:00pm Eastern Time (ET) and reflect that day's ending state across cash balances, accrued interest, accrued fees, as well as additional ancillary details.
      Parameters:
      accountId - Account globally unique identifier. If not provided, the report will be generated for all accounts. (optional)
      date - A date in the format YYYY-MM-DD. If not provided, the report will be generated for the most recent date this report is available. (optional)
      after - A date in the format YYYY-MM-DD, valid only if account_id is provided and date is not provided. If not provided, this will use `before` value. If neither is provided the most recent available date is used for both `before` and `after`. (optional)
      before - A date in the format YYYY-MM-DD, valid only if account_id is provided and date is not provided. If not provided, this will use the most recent available date. (optional)
      direction - The direction to use for sorting responses, either `asc` or `desc`. Only valid for account_id queries, for which only sorting by date is supported. Defaults to `desc`. (optional)
      pageSize - The page size, used for paginating responses. Defaults to 1000, with a maximum of 10,000. (optional, default to 1000)
      pageToken - A token used to retrieve the next page for paginated queries. If provided the response will begin at the next page of the results for the response from which the `next_page_token` is used. (optional)
      Returns:
      EoDCashInterestReportResponse
      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 Successful response, returns a list of daily interest accruals and an optional next page token. -
      400 A client error occurred. Please check the provided request parameters and try again. -
      401 Unauthorized. Please check your API key and try again. -
      429 Too many requests. Please wait a moment and try again. -
      500 A server error occurred. Please contact Alpaca. -
    • getV1GetEodCashInterestReportWithHttpInfo

      public ApiResponse<EoDCashInterestReportResponse> getV1GetEodCashInterestReportWithHttpInfo(@Nullable UUID accountId, @Nullable LocalDate date, @Nullable LocalDate after, @Nullable LocalDate before, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken) throws ApiException
      Retrieve EOD Cash Interest Details This API retrieves a list of cash interest details for the given date(s) for a single account or all accounts. End-of-day (EOD) details are typically accessible after 8:00pm Eastern Time (ET) and reflect that day's ending state across cash balances, accrued interest, accrued fees, as well as additional ancillary details.
      Parameters:
      accountId - Account globally unique identifier. If not provided, the report will be generated for all accounts. (optional)
      date - A date in the format YYYY-MM-DD. If not provided, the report will be generated for the most recent date this report is available. (optional)
      after - A date in the format YYYY-MM-DD, valid only if account_id is provided and date is not provided. If not provided, this will use `before` value. If neither is provided the most recent available date is used for both `before` and `after`. (optional)
      before - A date in the format YYYY-MM-DD, valid only if account_id is provided and date is not provided. If not provided, this will use the most recent available date. (optional)
      direction - The direction to use for sorting responses, either `asc` or `desc`. Only valid for account_id queries, for which only sorting by date is supported. Defaults to `desc`. (optional)
      pageSize - The page size, used for paginating responses. Defaults to 1000, with a maximum of 10,000. (optional, default to 1000)
      pageToken - A token used to retrieve the next page for paginated queries. If provided the response will begin at the next page of the results for the response from which the `next_page_token` is used. (optional)
      Returns:
      ApiResponse<EoDCashInterestReportResponse>
      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 Successful response, returns a list of daily interest accruals and an optional next page token. -
      400 A client error occurred. Please check the provided request parameters and try again. -
      401 Unauthorized. Please check your API key and try again. -
      429 Too many requests. Please wait a moment and try again. -
      500 A server error occurred. Please contact Alpaca. -
    • getV1GetEodCashInterestReportAsync

      public okhttp3.Call getV1GetEodCashInterestReportAsync(@Nullable UUID accountId, @Nullable LocalDate date, @Nullable LocalDate after, @Nullable LocalDate before, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken, ApiCallback<EoDCashInterestReportResponse> _callback) throws ApiException
      Retrieve EOD Cash Interest Details (asynchronously) This API retrieves a list of cash interest details for the given date(s) for a single account or all accounts. End-of-day (EOD) details are typically accessible after 8:00pm Eastern Time (ET) and reflect that day's ending state across cash balances, accrued interest, accrued fees, as well as additional ancillary details.
      Parameters:
      accountId - Account globally unique identifier. If not provided, the report will be generated for all accounts. (optional)
      date - A date in the format YYYY-MM-DD. If not provided, the report will be generated for the most recent date this report is available. (optional)
      after - A date in the format YYYY-MM-DD, valid only if account_id is provided and date is not provided. If not provided, this will use `before` value. If neither is provided the most recent available date is used for both `before` and `after`. (optional)
      before - A date in the format YYYY-MM-DD, valid only if account_id is provided and date is not provided. If not provided, this will use the most recent available date. (optional)
      direction - The direction to use for sorting responses, either `asc` or `desc`. Only valid for account_id queries, for which only sorting by date is supported. Defaults to `desc`. (optional)
      pageSize - The page size, used for paginating responses. Defaults to 1000, with a maximum of 10,000. (optional, default to 1000)
      pageToken - A token used to retrieve the next page for paginated queries. If provided the response will begin at the next page of the results for the response from which the `next_page_token` is used. (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 Successful response, returns a list of daily interest accruals and an optional next page token. -
      400 A client error occurred. Please check the provided request parameters and try again. -
      401 Unauthorized. Please check your API key and try again. -
      429 Too many requests. Please wait a moment and try again. -
      500 A server error occurred. Please contact Alpaca. -
    • getV1ReportingEodAggregatePositionsCall

      public okhttp3.Call getV1ReportingEodAggregatePositionsCall(@Nonnull LocalDate date, @Nullable String symbols, @Nullable String firmAccounts, ApiCallback _callback) throws ApiException
      Build call for getV1ReportingEodAggregatePositions
      Parameters:
      date - \"YYYY-MM-DD\" format (required)
      symbols - Comma-separated symbols. If populated, then only the specified symbols will be returned. If null, then all symbols will be included in the response. (optional)
      firmAccounts - Defaults to True which includes firm accounts. Passing False will exclude all firm accounts. (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 Array of objects, each object pertains to the date specified in the request and a unique asset. See parameters below. Notes: Returns an empty array for non-trading days, assets with no positions are omitted. -
    • getV1ReportingEodAggregatePositions

      public List<AggregatePositionResponse> getV1ReportingEodAggregatePositions(@Nonnull LocalDate date, @Nullable String symbols, @Nullable String firmAccounts) throws ApiException
      Retrieve Aggregate Positions This API endpoint provides reporting data to partners for aggregate common stock and crypto positions across their account base. Partners can view historical snapshots of their holding across their entire account base. Please note that this API utilizes an 8:00 pm (EST) cutoff which aligns with the end of the Securities extended hours trading session as well as Alpaca's 24 hour Crypto trading window. Additionally, the endpoint supports indexing to help the partner efficiently filter by key information including date and symbol while being able to include or remove firm accounts.
      Parameters:
      date - \"YYYY-MM-DD\" format (required)
      symbols - Comma-separated symbols. If populated, then only the specified symbols will be returned. If null, then all symbols will be included in the response. (optional)
      firmAccounts - Defaults to True which includes firm accounts. Passing False will exclude all firm accounts. (optional)
      Returns:
      List<AggregatePositionResponse>
      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 Array of objects, each object pertains to the date specified in the request and a unique asset. See parameters below. Notes: Returns an empty array for non-trading days, assets with no positions are omitted. -
    • getV1ReportingEodAggregatePositionsWithHttpInfo

      public ApiResponse<List<AggregatePositionResponse>> getV1ReportingEodAggregatePositionsWithHttpInfo(@Nonnull LocalDate date, @Nullable String symbols, @Nullable String firmAccounts) throws ApiException
      Retrieve Aggregate Positions This API endpoint provides reporting data to partners for aggregate common stock and crypto positions across their account base. Partners can view historical snapshots of their holding across their entire account base. Please note that this API utilizes an 8:00 pm (EST) cutoff which aligns with the end of the Securities extended hours trading session as well as Alpaca's 24 hour Crypto trading window. Additionally, the endpoint supports indexing to help the partner efficiently filter by key information including date and symbol while being able to include or remove firm accounts.
      Parameters:
      date - \"YYYY-MM-DD\" format (required)
      symbols - Comma-separated symbols. If populated, then only the specified symbols will be returned. If null, then all symbols will be included in the response. (optional)
      firmAccounts - Defaults to True which includes firm accounts. Passing False will exclude all firm accounts. (optional)
      Returns:
      ApiResponse<List<AggregatePositionResponse>>
      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 Array of objects, each object pertains to the date specified in the request and a unique asset. See parameters below. Notes: Returns an empty array for non-trading days, assets with no positions are omitted. -
    • getV1ReportingEodAggregatePositionsAsync

      public okhttp3.Call getV1ReportingEodAggregatePositionsAsync(@Nonnull LocalDate date, @Nullable String symbols, @Nullable String firmAccounts, ApiCallback<List<AggregatePositionResponse>> _callback) throws ApiException
      Retrieve Aggregate Positions (asynchronously) This API endpoint provides reporting data to partners for aggregate common stock and crypto positions across their account base. Partners can view historical snapshots of their holding across their entire account base. Please note that this API utilizes an 8:00 pm (EST) cutoff which aligns with the end of the Securities extended hours trading session as well as Alpaca's 24 hour Crypto trading window. Additionally, the endpoint supports indexing to help the partner efficiently filter by key information including date and symbol while being able to include or remove firm accounts.
      Parameters:
      date - \"YYYY-MM-DD\" format (required)
      symbols - Comma-separated symbols. If populated, then only the specified symbols will be returned. If null, then all symbols will be included in the response. (optional)
      firmAccounts - Defaults to True which includes firm accounts. Passing False will exclude all firm accounts. (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 Array of objects, each object pertains to the date specified in the request and a unique asset. See parameters below. Notes: Returns an empty array for non-trading days, assets with no positions are omitted. -
    • getV1ReportingEodPositionsCall

      public okhttp3.Call getV1ReportingEodPositionsCall(@Nullable UUID accountId, @Nullable String asset, @Nullable LocalDate asof, @Nullable String pageToken, @Nullable Integer limit, ApiCallback _callback) throws ApiException
      Build call for getV1ReportingEodPositions
      Parameters:
      accountId - Filter the results by account_id (optional). (optional)
      asset - Filter the results by asset ID or symbol (optional). (optional)
      asof - The positions date in 'YYYY-MM-DD' format. It's recommended to provide this parameter when the 'page' parameter is specified, to ensure precise data retrieval based on the desired date. Only previous trading date is supported. (optional)
      pageToken - Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)
      limit - The number of accounts to display per page (default=1000, max=10000). (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 Successful response containing the end-of-day positions for the specified accounts. -
      422 This can be returned if the asof param does not match the latest snap available at Alpaca. -
    • getV1ReportingEodPositions

      public GetV1ReportingEodPositions200Response getV1ReportingEodPositions(@Nullable UUID accountId, @Nullable String asset, @Nullable LocalDate asof, @Nullable String pageToken, @Nullable Integer limit) throws ApiException
      Retrieve EOD Positions This API retrieves a comprehensive list of end-of-day positions for all accounts. End-of-day (EOD) positions are typically accessible after 4:00 am Eastern Time (ET) on the following day, providing a comprehensive view of the day's closing positions across all accounts. This API currently only supports retrieving EOD positions for the last trading date.
      Parameters:
      accountId - Filter the results by account_id (optional). (optional)
      asset - Filter the results by asset ID or symbol (optional). (optional)
      asof - The positions date in 'YYYY-MM-DD' format. It's recommended to provide this parameter when the 'page' parameter is specified, to ensure precise data retrieval based on the desired date. Only previous trading date is supported. (optional)
      pageToken - Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)
      limit - The number of accounts to display per page (default=1000, max=10000). (optional)
      Returns:
      GetV1ReportingEodPositions200Response
      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 Successful response containing the end-of-day positions for the specified accounts. -
      422 This can be returned if the asof param does not match the latest snap available at Alpaca. -
    • getV1ReportingEodPositionsWithHttpInfo

      public ApiResponse<GetV1ReportingEodPositions200Response> getV1ReportingEodPositionsWithHttpInfo(@Nullable UUID accountId, @Nullable String asset, @Nullable LocalDate asof, @Nullable String pageToken, @Nullable Integer limit) throws ApiException
      Retrieve EOD Positions This API retrieves a comprehensive list of end-of-day positions for all accounts. End-of-day (EOD) positions are typically accessible after 4:00 am Eastern Time (ET) on the following day, providing a comprehensive view of the day's closing positions across all accounts. This API currently only supports retrieving EOD positions for the last trading date.
      Parameters:
      accountId - Filter the results by account_id (optional). (optional)
      asset - Filter the results by asset ID or symbol (optional). (optional)
      asof - The positions date in 'YYYY-MM-DD' format. It's recommended to provide this parameter when the 'page' parameter is specified, to ensure precise data retrieval based on the desired date. Only previous trading date is supported. (optional)
      pageToken - Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)
      limit - The number of accounts to display per page (default=1000, max=10000). (optional)
      Returns:
      ApiResponse<GetV1ReportingEodPositions200Response>
      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 Successful response containing the end-of-day positions for the specified accounts. -
      422 This can be returned if the asof param does not match the latest snap available at Alpaca. -
    • getV1ReportingEodPositionsAsync

      public okhttp3.Call getV1ReportingEodPositionsAsync(@Nullable UUID accountId, @Nullable String asset, @Nullable LocalDate asof, @Nullable String pageToken, @Nullable Integer limit, ApiCallback<GetV1ReportingEodPositions200Response> _callback) throws ApiException
      Retrieve EOD Positions (asynchronously) This API retrieves a comprehensive list of end-of-day positions for all accounts. End-of-day (EOD) positions are typically accessible after 4:00 am Eastern Time (ET) on the following day, providing a comprehensive view of the day's closing positions across all accounts. This API currently only supports retrieving EOD positions for the last trading date.
      Parameters:
      accountId - Filter the results by account_id (optional). (optional)
      asset - Filter the results by asset ID or symbol (optional). (optional)
      asof - The positions date in 'YYYY-MM-DD' format. It's recommended to provide this parameter when the 'page' parameter is specified, to ensure precise data retrieval based on the desired date. Only previous trading date is supported. (optional)
      pageToken - Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)
      limit - The number of accounts to display per page (default=1000, max=10000). (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 Successful response containing the end-of-day positions for the specified accounts. -
      422 This can be returned if the asof param does not match the latest snap available at Alpaca. -