Class AccountsApi

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

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

  • createAccount: Create an Account
  • createRecipientBank: Create a Bank Relationship for an Account
  • createTransferForAccount: Request a New Transfer
  • getAccount: Get An Account by ID
  • getAccountActivities: Retrieve Account Activities
  • getAccountActivitiesByType: Retrieve Account Activities of Specific Type
  • getAccountActivityEvent: Get a single activity (V2) event by event_id ULID.
  • getAllAccounts: Get All Accounts
  • getRecipientBanks: Retrieve Bank Relationships for an Account
  • getTradingAccount: Retrieve Trading Details for an Account
  • patchAccount: Update an Account
  • postV1AccountsAccountIdActionsClose: Close an Account
  • requestListOptionsApprovals: Retrieve options level approval requests (BETA)
  • requestOptionsForAccount: Request options trading for an account (BETA)
  • Constructor Details

    • AccountsApi

      public AccountsApi()
    • AccountsApi

      public AccountsApi(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)
    • createAccountCall

      public okhttp3.Call createAccountCall(@Nonnull AccountCreationRequest accountCreationRequest, ApiCallback _callback) throws ApiException
      Build call for createAccount
      Parameters:
      accountCreationRequest - (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 -
      400 The post body is not well formed. For Multi-Live Accounts (MLA), this also covers: - Supplying `primary_account_holder_id` together with `contact` or `identity`. - Supplying `primary_account_holder_id` with an `account_type` other than `trading` or `ira`. - The referenced primary account holder is not eligible to open an additional account. -
      409 There is already an existing account registered with the same email address. -
      422 One of the input values is not a valid value. -
    • createAccount

      public Account createAccount(@Nonnull AccountCreationRequest accountCreationRequest) throws ApiException
      Create an Account Submit an account application with KYC information. This will create a trading account for the end user. The account status may or may not be ACTIVE immediately and you will receive account status updates on the event API. **Multi-Live Accounts (MLA)**: To open an additional account for an existing account holder, supply `primary_account_holder_id` at the top level instead of `contact`/`identity` data. In that case, supplying `contact` or `identity` returns HTTP 400. Only `account_type` of `trading` and `ira` are supported via this flow.
      Parameters:
      accountCreationRequest - (required)
      Returns:
      Account
      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 -
      400 The post body is not well formed. For Multi-Live Accounts (MLA), this also covers: - Supplying `primary_account_holder_id` together with `contact` or `identity`. - Supplying `primary_account_holder_id` with an `account_type` other than `trading` or `ira`. - The referenced primary account holder is not eligible to open an additional account. -
      409 There is already an existing account registered with the same email address. -
      422 One of the input values is not a valid value. -
    • createAccountWithHttpInfo

      public ApiResponse<Account> createAccountWithHttpInfo(@Nonnull AccountCreationRequest accountCreationRequest) throws ApiException
      Create an Account Submit an account application with KYC information. This will create a trading account for the end user. The account status may or may not be ACTIVE immediately and you will receive account status updates on the event API. **Multi-Live Accounts (MLA)**: To open an additional account for an existing account holder, supply `primary_account_holder_id` at the top level instead of `contact`/`identity` data. In that case, supplying `contact` or `identity` returns HTTP 400. Only `account_type` of `trading` and `ira` are supported via this flow.
      Parameters:
      accountCreationRequest - (required)
      Returns:
      ApiResponse<Account>
      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 -
      400 The post body is not well formed. For Multi-Live Accounts (MLA), this also covers: - Supplying `primary_account_holder_id` together with `contact` or `identity`. - Supplying `primary_account_holder_id` with an `account_type` other than `trading` or `ira`. - The referenced primary account holder is not eligible to open an additional account. -
      409 There is already an existing account registered with the same email address. -
      422 One of the input values is not a valid value. -
    • createAccountAsync

      public okhttp3.Call createAccountAsync(@Nonnull AccountCreationRequest accountCreationRequest, ApiCallback<Account> _callback) throws ApiException
      Create an Account (asynchronously) Submit an account application with KYC information. This will create a trading account for the end user. The account status may or may not be ACTIVE immediately and you will receive account status updates on the event API. **Multi-Live Accounts (MLA)**: To open an additional account for an existing account holder, supply `primary_account_holder_id` at the top level instead of `contact`/`identity` data. In that case, supplying `contact` or `identity` returns HTTP 400. Only `account_type` of `trading` and `ira` are supported via this flow.
      Parameters:
      accountCreationRequest - (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 -
      400 The post body is not well formed. For Multi-Live Accounts (MLA), this also covers: - Supplying `primary_account_holder_id` together with `contact` or `identity`. - Supplying `primary_account_holder_id` with an `account_type` other than `trading` or `ira`. - The referenced primary account holder is not eligible to open an additional account. -
      409 There is already an existing account registered with the same email address. -
      422 One of the input values is not a valid value. -
    • createRecipientBankCall

      public okhttp3.Call createRecipientBankCall(@Nonnull UUID accountId, @Nonnull CreateBankRequest createBankRequest, ApiCallback _callback) throws ApiException
      Build call for createRecipientBank
      Parameters:
      accountId - Account identifier. (required)
      createBankRequest - (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 The created Bank relationship -
      400 Bad Request -
      409 A Bank relationship already exists for this account -
    • createRecipientBank

      public Bank createRecipientBank(@Nonnull UUID accountId, @Nonnull CreateBankRequest createBankRequest) throws ApiException
      Create a Bank Relationship for an Account If successful, retrieves Bank Relationships for an account
      Parameters:
      accountId - Account identifier. (required)
      createBankRequest - (required)
      Returns:
      Bank
      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 The created Bank relationship -
      400 Bad Request -
      409 A Bank relationship already exists for this account -
    • createRecipientBankWithHttpInfo

      public ApiResponse<Bank> createRecipientBankWithHttpInfo(@Nonnull UUID accountId, @Nonnull CreateBankRequest createBankRequest) throws ApiException
      Create a Bank Relationship for an Account If successful, retrieves Bank Relationships for an account
      Parameters:
      accountId - Account identifier. (required)
      createBankRequest - (required)
      Returns:
      ApiResponse<Bank>
      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 The created Bank relationship -
      400 Bad Request -
      409 A Bank relationship already exists for this account -
    • createRecipientBankAsync

      public okhttp3.Call createRecipientBankAsync(@Nonnull UUID accountId, @Nonnull CreateBankRequest createBankRequest, ApiCallback<Bank> _callback) throws ApiException
      Create a Bank Relationship for an Account (asynchronously) If successful, retrieves Bank Relationships for an account
      Parameters:
      accountId - Account identifier. (required)
      createBankRequest - (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 The created Bank relationship -
      400 Bad Request -
      409 A Bank relationship already exists for this account -
    • createTransferForAccountCall

      public okhttp3.Call createTransferForAccountCall(@Nonnull UUID accountId, @Nonnull CreateTransferRequest createTransferRequest, ApiCallback _callback) throws ApiException
      Build call for createTransferForAccount
      Parameters:
      accountId - Account identifier. (required)
      createTransferRequest - (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 Successfully requested a transfer. -
      400 The request body is malformed (e.g. invalid JSON). -
      403 The account is not permitted to perform this transfer. Examples include: - `deposits are not permitted for this account` — the account's `depositable_status` is not `allowed` / `limited`. - `withdrawals are not permitted for this account` — the account's `withdrawable_status` is not `allowed` / `limited`. -
      422 The request was rejected by validation. Common reasons include: - `cannot submit incoming wire transfer using this API` — sent `transfer_type: wire` with `direction: INCOMING`. Incoming wires cannot be initiated through this endpoint. - `invalid relationship_id` / `bank_id required for wire transfer` — missing the required relationship/bank identifier for the chosen `transfer_type`. - `bank_id should be empty for ach transfer` / `relationship_id should be empty for wire transfer` — provided the wrong identifier for the chosen `transfer_type`. - `only wire transfer type can provide additional information for the transfer` — `additional_information` was supplied on a non-wire request. - `amount must be greater than 0.00` / `deposit amount must be greater than or equal to <min>` / `withdrawal amount must be greater than <min>` — amount fails the minimum-amount checks. - `transfer_type must be either ach or wire` / `direction must be either incoming or outgoing` — invalid enum values. -
    • createTransferForAccount

      public Transfer createTransferForAccount(@Nonnull UUID accountId, @Nonnull CreateTransferRequest createTransferRequest) throws ApiException
      Request a New Transfer Create a new transfer to deposit money into or withdraw money from an account. Two `transfer_type` values are accepted, and both are available in sandbox and production: - **`ach`** — supports both `INCOMING` (deposit) and `OUTGOING` (withdrawal) directions. A `relationship_id` from a previously created [ACH Relationship](https://docs.alpaca.markets/reference/createachrelationshipforaccount) is required. - **`wire`** — supports the `OUTGOING` (withdrawal) direction only. Incoming wires cannot be initiated through this endpoint; they are pushed in by the sending bank and recorded automatically. A `bank_id` from a previously created [Bank Relationship](https://docs.alpaca.markets/reference/createrecipientbank) is required, and the bank must be in `APPROVED` status before the transfer will progress past `QUEUED`. In the sandbox environment, ACH deposits and withdrawals settle instantly against virtual funds. Outgoing wire withdrawals are accepted and simulated end-to-end — no funds are transmitted to a bank, but the transfer progresses to `COMPLETE` and the account is debited against virtual funds. Sandbox wire withdrawals are asynchronous (not instant) and auto-complete on weekdays only; transfers submitted on a weekend will not progress until Monday. For more on funding accounts in sandbox, see [this tutorial](https://alpaca.markets/learn/fund-broker-api/).
      Parameters:
      accountId - Account identifier. (required)
      createTransferRequest - (required)
      Returns:
      Transfer
      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 Successfully requested a transfer. -
      400 The request body is malformed (e.g. invalid JSON). -
      403 The account is not permitted to perform this transfer. Examples include: - `deposits are not permitted for this account` — the account's `depositable_status` is not `allowed` / `limited`. - `withdrawals are not permitted for this account` — the account's `withdrawable_status` is not `allowed` / `limited`. -
      422 The request was rejected by validation. Common reasons include: - `cannot submit incoming wire transfer using this API` — sent `transfer_type: wire` with `direction: INCOMING`. Incoming wires cannot be initiated through this endpoint. - `invalid relationship_id` / `bank_id required for wire transfer` — missing the required relationship/bank identifier for the chosen `transfer_type`. - `bank_id should be empty for ach transfer` / `relationship_id should be empty for wire transfer` — provided the wrong identifier for the chosen `transfer_type`. - `only wire transfer type can provide additional information for the transfer` — `additional_information` was supplied on a non-wire request. - `amount must be greater than 0.00` / `deposit amount must be greater than or equal to <min>` / `withdrawal amount must be greater than <min>` — amount fails the minimum-amount checks. - `transfer_type must be either ach or wire` / `direction must be either incoming or outgoing` — invalid enum values. -
    • createTransferForAccountWithHttpInfo

      public ApiResponse<Transfer> createTransferForAccountWithHttpInfo(@Nonnull UUID accountId, @Nonnull CreateTransferRequest createTransferRequest) throws ApiException
      Request a New Transfer Create a new transfer to deposit money into or withdraw money from an account. Two `transfer_type` values are accepted, and both are available in sandbox and production: - **`ach`** — supports both `INCOMING` (deposit) and `OUTGOING` (withdrawal) directions. A `relationship_id` from a previously created [ACH Relationship](https://docs.alpaca.markets/reference/createachrelationshipforaccount) is required. - **`wire`** — supports the `OUTGOING` (withdrawal) direction only. Incoming wires cannot be initiated through this endpoint; they are pushed in by the sending bank and recorded automatically. A `bank_id` from a previously created [Bank Relationship](https://docs.alpaca.markets/reference/createrecipientbank) is required, and the bank must be in `APPROVED` status before the transfer will progress past `QUEUED`. In the sandbox environment, ACH deposits and withdrawals settle instantly against virtual funds. Outgoing wire withdrawals are accepted and simulated end-to-end — no funds are transmitted to a bank, but the transfer progresses to `COMPLETE` and the account is debited against virtual funds. Sandbox wire withdrawals are asynchronous (not instant) and auto-complete on weekdays only; transfers submitted on a weekend will not progress until Monday. For more on funding accounts in sandbox, see [this tutorial](https://alpaca.markets/learn/fund-broker-api/).
      Parameters:
      accountId - Account identifier. (required)
      createTransferRequest - (required)
      Returns:
      ApiResponse<Transfer>
      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 Successfully requested a transfer. -
      400 The request body is malformed (e.g. invalid JSON). -
      403 The account is not permitted to perform this transfer. Examples include: - `deposits are not permitted for this account` — the account's `depositable_status` is not `allowed` / `limited`. - `withdrawals are not permitted for this account` — the account's `withdrawable_status` is not `allowed` / `limited`. -
      422 The request was rejected by validation. Common reasons include: - `cannot submit incoming wire transfer using this API` — sent `transfer_type: wire` with `direction: INCOMING`. Incoming wires cannot be initiated through this endpoint. - `invalid relationship_id` / `bank_id required for wire transfer` — missing the required relationship/bank identifier for the chosen `transfer_type`. - `bank_id should be empty for ach transfer` / `relationship_id should be empty for wire transfer` — provided the wrong identifier for the chosen `transfer_type`. - `only wire transfer type can provide additional information for the transfer` — `additional_information` was supplied on a non-wire request. - `amount must be greater than 0.00` / `deposit amount must be greater than or equal to <min>` / `withdrawal amount must be greater than <min>` — amount fails the minimum-amount checks. - `transfer_type must be either ach or wire` / `direction must be either incoming or outgoing` — invalid enum values. -
    • createTransferForAccountAsync

      public okhttp3.Call createTransferForAccountAsync(@Nonnull UUID accountId, @Nonnull CreateTransferRequest createTransferRequest, ApiCallback<Transfer> _callback) throws ApiException
      Request a New Transfer (asynchronously) Create a new transfer to deposit money into or withdraw money from an account. Two `transfer_type` values are accepted, and both are available in sandbox and production: - **`ach`** — supports both `INCOMING` (deposit) and `OUTGOING` (withdrawal) directions. A `relationship_id` from a previously created [ACH Relationship](https://docs.alpaca.markets/reference/createachrelationshipforaccount) is required. - **`wire`** — supports the `OUTGOING` (withdrawal) direction only. Incoming wires cannot be initiated through this endpoint; they are pushed in by the sending bank and recorded automatically. A `bank_id` from a previously created [Bank Relationship](https://docs.alpaca.markets/reference/createrecipientbank) is required, and the bank must be in `APPROVED` status before the transfer will progress past `QUEUED`. In the sandbox environment, ACH deposits and withdrawals settle instantly against virtual funds. Outgoing wire withdrawals are accepted and simulated end-to-end — no funds are transmitted to a bank, but the transfer progresses to `COMPLETE` and the account is debited against virtual funds. Sandbox wire withdrawals are asynchronous (not instant) and auto-complete on weekdays only; transfers submitted on a weekend will not progress until Monday. For more on funding accounts in sandbox, see [this tutorial](https://alpaca.markets/learn/fund-broker-api/).
      Parameters:
      accountId - Account identifier. (required)
      createTransferRequest - (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 Successfully requested a transfer. -
      400 The request body is malformed (e.g. invalid JSON). -
      403 The account is not permitted to perform this transfer. Examples include: - `deposits are not permitted for this account` — the account's `depositable_status` is not `allowed` / `limited`. - `withdrawals are not permitted for this account` — the account's `withdrawable_status` is not `allowed` / `limited`. -
      422 The request was rejected by validation. Common reasons include: - `cannot submit incoming wire transfer using this API` — sent `transfer_type: wire` with `direction: INCOMING`. Incoming wires cannot be initiated through this endpoint. - `invalid relationship_id` / `bank_id required for wire transfer` — missing the required relationship/bank identifier for the chosen `transfer_type`. - `bank_id should be empty for ach transfer` / `relationship_id should be empty for wire transfer` — provided the wrong identifier for the chosen `transfer_type`. - `only wire transfer type can provide additional information for the transfer` — `additional_information` was supplied on a non-wire request. - `amount must be greater than 0.00` / `deposit amount must be greater than or equal to <min>` / `withdrawal amount must be greater than <min>` — amount fails the minimum-amount checks. - `transfer_type must be either ach or wire` / `direction must be either incoming or outgoing` — invalid enum values. -
    • getAccountCall

      public okhttp3.Call getAccountCall(@Nonnull UUID accountId, ApiCallback _callback) throws ApiException
      Build call for getAccount
      Parameters:
      accountId - Account identifier. (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 Will return an AccountExtended if an account with account_id exists, otherwise will throw an error. -
    • getAccount

      public AccountExtended getAccount(@Nonnull UUID accountId) throws ApiException
      Get An Account by ID You can query a specific account that you submitted to Alpaca by passing into the query the account_id associated with the account you're retrieving.
      Parameters:
      accountId - Account identifier. (required)
      Returns:
      AccountExtended
      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 Will return an AccountExtended if an account with account_id exists, otherwise will throw an error. -
    • getAccountWithHttpInfo

      public ApiResponse<AccountExtended> getAccountWithHttpInfo(@Nonnull UUID accountId) throws ApiException
      Get An Account by ID You can query a specific account that you submitted to Alpaca by passing into the query the account_id associated with the account you're retrieving.
      Parameters:
      accountId - Account identifier. (required)
      Returns:
      ApiResponse<AccountExtended>
      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 Will return an AccountExtended if an account with account_id exists, otherwise will throw an error. -
    • getAccountAsync

      public okhttp3.Call getAccountAsync(@Nonnull UUID accountId, ApiCallback<AccountExtended> _callback) throws ApiException
      Get An Account by ID (asynchronously) You can query a specific account that you submitted to Alpaca by passing into the query the account_id associated with the account you're retrieving.
      Parameters:
      accountId - Account identifier. (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 Will return an AccountExtended if an account with account_id exists, otherwise will throw an error. -
    • getAccountActivitiesCall

      public okhttp3.Call getAccountActivitiesCall(@Nullable UUID accountId, @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:
      accountId - id of a single account to filter by (optional)
      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 submission time. asc or desc. Defaults to desc. (optional)
      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 Success -
    • getAccountActivities

      public List<Activity> getAccountActivities(@Nullable UUID accountId, @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. * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size.
      Parameters:
      accountId - id of a single account to filter by (optional)
      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 submission time. asc or desc. Defaults to desc. (optional)
      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<Activity>
      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 Success -
    • getAccountActivitiesWithHttpInfo

      public ApiResponse<List<Activity>> getAccountActivitiesWithHttpInfo(@Nullable UUID accountId, @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. * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size.
      Parameters:
      accountId - id of a single account to filter by (optional)
      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 submission time. asc or desc. Defaults to desc. (optional)
      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<Activity>>
      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 Success -
    • getAccountActivitiesAsync

      public okhttp3.Call getAccountActivitiesAsync(@Nullable UUID accountId, @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<Activity>> _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. * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size.
      Parameters:
      accountId - id of a single account to filter by (optional)
      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 submission time. asc or desc. Defaults to desc. (optional)
      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 Success -
    • getAccountActivitiesByTypeCall

      public okhttp3.Call getAccountActivitiesByTypeCall(@Nonnull String activityType, @Nullable UUID accountId, @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 getAccountActivitiesByType
      Parameters:
      activityType - see ActivityType model for details about what the different types mean (required)
      accountId - id of a single account to filter by (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 submission time. asc or desc. Defaults to desc. (optional)
      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 Success -
    • getAccountActivitiesByType

      public List<Activity> getAccountActivitiesByType(@Nonnull String activityType, @Nullable UUID accountId, @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 Retrieves an array of Activity by type. If {activity_type} is provided as part of the URL, category cannot be provided as query parameter. They are mutually exclusive. Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the end of your current page of results. for example if in your first response the id of the last Activiy item returned in the array was `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you'd pass that value as `page_token` to get the next page of results * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size.
      Parameters:
      activityType - see ActivityType model for details about what the different types mean (required)
      accountId - id of a single account to filter by (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 submission time. asc or desc. Defaults to desc. (optional)
      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<Activity>
      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 Success -
    • getAccountActivitiesByTypeWithHttpInfo

      public ApiResponse<List<Activity>> getAccountActivitiesByTypeWithHttpInfo(@Nonnull String activityType, @Nullable UUID accountId, @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 Retrieves an array of Activity by type. If {activity_type} is provided as part of the URL, category cannot be provided as query parameter. They are mutually exclusive. Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the end of your current page of results. for example if in your first response the id of the last Activiy item returned in the array was `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you'd pass that value as `page_token` to get the next page of results * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size.
      Parameters:
      activityType - see ActivityType model for details about what the different types mean (required)
      accountId - id of a single account to filter by (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 submission time. asc or desc. Defaults to desc. (optional)
      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<Activity>>
      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 Success -
    • getAccountActivitiesByTypeAsync

      public okhttp3.Call getAccountActivitiesByTypeAsync(@Nonnull String activityType, @Nullable UUID accountId, @Nullable OffsetDateTime date, @Nullable OffsetDateTime until, @Nullable OffsetDateTime after, @Nullable String direction, @Nullable Integer pageSize, @Nullable String pageToken, ApiCallback<List<Activity>> _callback) throws ApiException
      Retrieve Account Activities of Specific Type (asynchronously) Retrieves an array of Activity by type. If {activity_type} is provided as part of the URL, category cannot be provided as query parameter. They are mutually exclusive. Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the end of your current page of results. for example if in your first response the id of the last Activiy item returned in the array was `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you'd pass that value as `page_token` to get the next page of results * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size.
      Parameters:
      activityType - see ActivityType model for details about what the different types mean (required)
      accountId - id of a single account to filter by (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 submission time. asc or desc. Defaults to desc. (optional)
      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 Success -
    • getAccountActivityEventCall

      public okhttp3.Call getAccountActivityEventCall(@Nonnull UUID accountId, @Nonnull String eventId, ApiCallback _callback) throws ApiException
      Build call for getAccountActivityEvent
      Parameters:
      accountId - Account identifier. (required)
      eventId - The ULID that uniquely identifies the activity event. (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 Returns a single activity v2 event, identified by the provided event_id ULID. -
    • getAccountActivityEvent

      public ActivityEventV2 getAccountActivityEvent(@Nonnull UUID accountId, @Nonnull String eventId) throws ApiException
      Get a single activity (V2) event by event_id ULID. Returns a single account activity (V2) event for the specified account by ULID `event_id`, delivered as a server-sent event message. This is the single-event counterpart to the `subscribeToActivitiesSSE` streaming endpoint, intended for re-fetching an individual activity that was previously observed on the activities stream.
      Parameters:
      accountId - Account identifier. (required)
      eventId - The ULID that uniquely identifies the activity event. (required)
      Returns:
      ActivityEventV2
      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 a single activity v2 event, identified by the provided event_id ULID. -
    • getAccountActivityEventWithHttpInfo

      public ApiResponse<ActivityEventV2> getAccountActivityEventWithHttpInfo(@Nonnull UUID accountId, @Nonnull String eventId) throws ApiException
      Get a single activity (V2) event by event_id ULID. Returns a single account activity (V2) event for the specified account by ULID `event_id`, delivered as a server-sent event message. This is the single-event counterpart to the `subscribeToActivitiesSSE` streaming endpoint, intended for re-fetching an individual activity that was previously observed on the activities stream.
      Parameters:
      accountId - Account identifier. (required)
      eventId - The ULID that uniquely identifies the activity event. (required)
      Returns:
      ApiResponse<ActivityEventV2>
      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 a single activity v2 event, identified by the provided event_id ULID. -
    • getAccountActivityEventAsync

      public okhttp3.Call getAccountActivityEventAsync(@Nonnull UUID accountId, @Nonnull String eventId, ApiCallback<ActivityEventV2> _callback) throws ApiException
      Get a single activity (V2) event by event_id ULID. (asynchronously) Returns a single account activity (V2) event for the specified account by ULID `event_id`, delivered as a server-sent event message. This is the single-event counterpart to the `subscribeToActivitiesSSE` streaming endpoint, intended for re-fetching an individual activity that was previously observed on the activities stream.
      Parameters:
      accountId - Account identifier. (required)
      eventId - The ULID that uniquely identifies the activity event. (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 Returns a single activity v2 event, identified by the provided event_id ULID. -
    • getAllAccountsCall

      public okhttp3.Call getAllAccountsCall(@Nullable String query, @Nullable OffsetDateTime createdAfter, @Nullable OffsetDateTime createdBefore, @Nullable String status, @Nullable String sort, @Nullable String entities, ApiCallback _callback) throws ApiException
      Build call for getAllAccounts
      Parameters:
      query - A space-delimited list of tokens. The response will contain accounts that match with all of the tokens (i.e. a logical AND). A match means the token is present in either the account's associated account number, phone number, name, or e-mail address (logical OR). (optional)
      createdAfter - Inclusive of timestamp. Example: 2019-10-12T07:20:50.52Z (optional)
      createdBefore - Inclusive of timestamp. Example: 2019-10-12T07:20:50.52Z (optional)
      status - See the AccountStatus model for values (optional)
      sort - The chronological order of response based on the submission time. asc or desc. Defaults to desc. (optional)
      entities - Comma-delimited entity names to include in the response. If not specified, all entities are included. (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 A list of accounts that match the query parameters. -
    • getAllAccounts

      public List<AccountExtended> getAllAccounts(@Nullable String query, @Nullable OffsetDateTime createdAfter, @Nullable OffsetDateTime createdBefore, @Nullable String status, @Nullable String sort, @Nullable String entities) throws ApiException
      Get All Accounts Retrieves the first 1000 accounts that match the query parameters. Sorting is based on creation time. The created_after/created_before query parameters can be used to paginate the results. To further limit the size of the response, the entities query parameter can be used to specify which properties are included in the response.
      Parameters:
      query - A space-delimited list of tokens. The response will contain accounts that match with all of the tokens (i.e. a logical AND). A match means the token is present in either the account's associated account number, phone number, name, or e-mail address (logical OR). (optional)
      createdAfter - Inclusive of timestamp. Example: 2019-10-12T07:20:50.52Z (optional)
      createdBefore - Inclusive of timestamp. Example: 2019-10-12T07:20:50.52Z (optional)
      status - See the AccountStatus model for values (optional)
      sort - The chronological order of response based on the submission time. asc or desc. Defaults to desc. (optional)
      entities - Comma-delimited entity names to include in the response. If not specified, all entities are included. (optional)
      Returns:
      List<AccountExtended>
      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 A list of accounts that match the query parameters. -
    • getAllAccountsWithHttpInfo

      public ApiResponse<List<AccountExtended>> getAllAccountsWithHttpInfo(@Nullable String query, @Nullable OffsetDateTime createdAfter, @Nullable OffsetDateTime createdBefore, @Nullable String status, @Nullable String sort, @Nullable String entities) throws ApiException
      Get All Accounts Retrieves the first 1000 accounts that match the query parameters. Sorting is based on creation time. The created_after/created_before query parameters can be used to paginate the results. To further limit the size of the response, the entities query parameter can be used to specify which properties are included in the response.
      Parameters:
      query - A space-delimited list of tokens. The response will contain accounts that match with all of the tokens (i.e. a logical AND). A match means the token is present in either the account's associated account number, phone number, name, or e-mail address (logical OR). (optional)
      createdAfter - Inclusive of timestamp. Example: 2019-10-12T07:20:50.52Z (optional)
      createdBefore - Inclusive of timestamp. Example: 2019-10-12T07:20:50.52Z (optional)
      status - See the AccountStatus model for values (optional)
      sort - The chronological order of response based on the submission time. asc or desc. Defaults to desc. (optional)
      entities - Comma-delimited entity names to include in the response. If not specified, all entities are included. (optional)
      Returns:
      ApiResponse<List<AccountExtended>>
      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 A list of accounts that match the query parameters. -
    • getAllAccountsAsync

      public okhttp3.Call getAllAccountsAsync(@Nullable String query, @Nullable OffsetDateTime createdAfter, @Nullable OffsetDateTime createdBefore, @Nullable String status, @Nullable String sort, @Nullable String entities, ApiCallback<List<AccountExtended>> _callback) throws ApiException
      Get All Accounts (asynchronously) Retrieves the first 1000 accounts that match the query parameters. Sorting is based on creation time. The created_after/created_before query parameters can be used to paginate the results. To further limit the size of the response, the entities query parameter can be used to specify which properties are included in the response.
      Parameters:
      query - A space-delimited list of tokens. The response will contain accounts that match with all of the tokens (i.e. a logical AND). A match means the token is present in either the account's associated account number, phone number, name, or e-mail address (logical OR). (optional)
      createdAfter - Inclusive of timestamp. Example: 2019-10-12T07:20:50.52Z (optional)
      createdBefore - Inclusive of timestamp. Example: 2019-10-12T07:20:50.52Z (optional)
      status - See the AccountStatus model for values (optional)
      sort - The chronological order of response based on the submission time. asc or desc. Defaults to desc. (optional)
      entities - Comma-delimited entity names to include in the response. If not specified, all entities are included. (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 A list of accounts that match the query parameters. -
    • getRecipientBanksCall

      public okhttp3.Call getRecipientBanksCall(@Nonnull UUID accountId, @Nullable String status, @Nullable String bankName, ApiCallback _callback) throws ApiException
      Build call for getRecipientBanks
      Parameters:
      accountId - Account identifier. (required)
      status - (optional)
      bankName - (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 An array of Bank relationships attached to this Account. An empty array will be returned if no Bank relationships have been attached to this account -
      400 Bad request. The body in the request is not valid. -
    • getRecipientBanks

      public List<Bank> getRecipientBanks(@Nonnull UUID accountId, @Nullable String status, @Nullable String bankName) throws ApiException
      Retrieve Bank Relationships for an Account Retrieves Bank Relationships for an account
      Parameters:
      accountId - Account identifier. (required)
      status - (optional)
      bankName - (optional)
      Returns:
      List<Bank>
      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 An array of Bank relationships attached to this Account. An empty array will be returned if no Bank relationships have been attached to this account -
      400 Bad request. The body in the request is not valid. -
    • getRecipientBanksWithHttpInfo

      public ApiResponse<List<Bank>> getRecipientBanksWithHttpInfo(@Nonnull UUID accountId, @Nullable String status, @Nullable String bankName) throws ApiException
      Retrieve Bank Relationships for an Account Retrieves Bank Relationships for an account
      Parameters:
      accountId - Account identifier. (required)
      status - (optional)
      bankName - (optional)
      Returns:
      ApiResponse<List<Bank>>
      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 An array of Bank relationships attached to this Account. An empty array will be returned if no Bank relationships have been attached to this account -
      400 Bad request. The body in the request is not valid. -
    • getRecipientBanksAsync

      public okhttp3.Call getRecipientBanksAsync(@Nonnull UUID accountId, @Nullable String status, @Nullable String bankName, ApiCallback<List<Bank>> _callback) throws ApiException
      Retrieve Bank Relationships for an Account (asynchronously) Retrieves Bank Relationships for an account
      Parameters:
      accountId - Account identifier. (required)
      status - (optional)
      bankName - (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 An array of Bank relationships attached to this Account. An empty array will be returned if no Bank relationships have been attached to this account -
      400 Bad request. The body in the request is not valid. -
    • getTradingAccountCall

      public okhttp3.Call getTradingAccountCall(@Nonnull UUID accountId, ApiCallback _callback) throws ApiException
      Build call for getTradingAccount
      Parameters:
      accountId - Account identifier. (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 -
    • getTradingAccount

      public TradeAccount getTradingAccount(@Nonnull UUID accountId) throws ApiException
      Retrieve Trading Details for an Account As a broker you can view more trading details about your users. The response is a Trading Account model.
      Parameters:
      accountId - Account identifier. (required)
      Returns:
      TradeAccount
      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 -
    • getTradingAccountWithHttpInfo

      public ApiResponse<TradeAccount> getTradingAccountWithHttpInfo(@Nonnull UUID accountId) throws ApiException
      Retrieve Trading Details for an Account As a broker you can view more trading details about your users. The response is a Trading Account model.
      Parameters:
      accountId - Account identifier. (required)
      Returns:
      ApiResponse<TradeAccount>
      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 -
    • getTradingAccountAsync

      public okhttp3.Call getTradingAccountAsync(@Nonnull UUID accountId, ApiCallback<TradeAccount> _callback) throws ApiException
      Retrieve Trading Details for an Account (asynchronously) As a broker you can view more trading details about your users. The response is a Trading Account model.
      Parameters:
      accountId - Account identifier. (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 -
    • patchAccountCall

      public okhttp3.Call patchAccountCall(@Nonnull UUID accountId, @Nonnull AccountUpdateRequest accountUpdateRequest, ApiCallback _callback) throws ApiException
      Build call for patchAccount
      Parameters:
      accountId - Account identifier. (required)
      accountUpdateRequest - (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 If all parameters are valid and updates have been made, it returns with status code 200. The response is the account model. -
      400 The post body is not well formed. This also includes attempts to change the primary account holder via `primary_account_holder_id`: the field is immutable after account creation, so supplying a value different from the account's current primary account holder returns HTTP 400. -
      422 The request body contains an attribute that is not permitted to be updated or you are attempting to set an invalid value. -
    • patchAccount

      public AccountExtended patchAccount(@Nonnull UUID accountId, @Nonnull AccountUpdateRequest accountUpdateRequest) throws ApiException
      Update an Account This operation updates account information. If all parameters are valid and updates have been made, it returns with status code 200. The response is the account model. **Multi-Live Accounts (MLA)**: The `primary_account_holder_id` field is read-only after the account is created. Omitting it or supplying the value already associated with the account is a no-op; supplying a different value returns HTTP 400.
      Parameters:
      accountId - Account identifier. (required)
      accountUpdateRequest - (required)
      Returns:
      AccountExtended
      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 If all parameters are valid and updates have been made, it returns with status code 200. The response is the account model. -
      400 The post body is not well formed. This also includes attempts to change the primary account holder via `primary_account_holder_id`: the field is immutable after account creation, so supplying a value different from the account's current primary account holder returns HTTP 400. -
      422 The request body contains an attribute that is not permitted to be updated or you are attempting to set an invalid value. -
    • patchAccountWithHttpInfo

      public ApiResponse<AccountExtended> patchAccountWithHttpInfo(@Nonnull UUID accountId, @Nonnull AccountUpdateRequest accountUpdateRequest) throws ApiException
      Update an Account This operation updates account information. If all parameters are valid and updates have been made, it returns with status code 200. The response is the account model. **Multi-Live Accounts (MLA)**: The `primary_account_holder_id` field is read-only after the account is created. Omitting it or supplying the value already associated with the account is a no-op; supplying a different value returns HTTP 400.
      Parameters:
      accountId - Account identifier. (required)
      accountUpdateRequest - (required)
      Returns:
      ApiResponse<AccountExtended>
      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 If all parameters are valid and updates have been made, it returns with status code 200. The response is the account model. -
      400 The post body is not well formed. This also includes attempts to change the primary account holder via `primary_account_holder_id`: the field is immutable after account creation, so supplying a value different from the account's current primary account holder returns HTTP 400. -
      422 The request body contains an attribute that is not permitted to be updated or you are attempting to set an invalid value. -
    • patchAccountAsync

      public okhttp3.Call patchAccountAsync(@Nonnull UUID accountId, @Nonnull AccountUpdateRequest accountUpdateRequest, ApiCallback<AccountExtended> _callback) throws ApiException
      Update an Account (asynchronously) This operation updates account information. If all parameters are valid and updates have been made, it returns with status code 200. The response is the account model. **Multi-Live Accounts (MLA)**: The `primary_account_holder_id` field is read-only after the account is created. Omitting it or supplying the value already associated with the account is a no-op; supplying a different value returns HTTP 400.
      Parameters:
      accountId - Account identifier. (required)
      accountUpdateRequest - (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 If all parameters are valid and updates have been made, it returns with status code 200. The response is the account model. -
      400 The post body is not well formed. This also includes attempts to change the primary account holder via `primary_account_holder_id`: the field is immutable after account creation, so supplying a value different from the account's current primary account holder returns HTTP 400. -
      422 The request body contains an attribute that is not permitted to be updated or you are attempting to set an invalid value. -
    • postV1AccountsAccountIdActionsCloseCall

      public okhttp3.Call postV1AccountsAccountIdActionsCloseCall(@Nonnull String accountId, ApiCallback _callback) throws ApiException
      Build call for postV1AccountsAccountIdActionsClose
      Parameters:
      accountId - The id of the account to be closed (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
      204 Success -
      404 Account Not Found -
    • postV1AccountsAccountIdActionsClose

      public void postV1AccountsAccountIdActionsClose(@Nonnull String accountId) throws ApiException
      Close an Account This operation closes an active account. The underlying records and information of the account are not deleted by this operation. **Before closing an account, you are responsible for closing all the positions and withdrawing all the money associated with that account. Learn more in the Positions Documentation.**
      Parameters:
      accountId - The id of the account to be closed (required)
      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
      204 Success -
      404 Account Not Found -
    • postV1AccountsAccountIdActionsCloseWithHttpInfo

      public ApiResponse<Void> postV1AccountsAccountIdActionsCloseWithHttpInfo(@Nonnull String accountId) throws ApiException
      Close an Account This operation closes an active account. The underlying records and information of the account are not deleted by this operation. **Before closing an account, you are responsible for closing all the positions and withdrawing all the money associated with that account. Learn more in the Positions Documentation.**
      Parameters:
      accountId - The id of the account to be closed (required)
      Returns:
      ApiResponse<Void>
      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
      204 Success -
      404 Account Not Found -
    • postV1AccountsAccountIdActionsCloseAsync

      public okhttp3.Call postV1AccountsAccountIdActionsCloseAsync(@Nonnull String accountId, ApiCallback<Void> _callback) throws ApiException
      Close an Account (asynchronously) This operation closes an active account. The underlying records and information of the account are not deleted by this operation. **Before closing an account, you are responsible for closing all the positions and withdrawing all the money associated with that account. Learn more in the Positions Documentation.**
      Parameters:
      accountId - The id of the account to be closed (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
      204 Success -
      404 Account Not Found -
    • requestListOptionsApprovalsCall

      public okhttp3.Call requestListOptionsApprovalsCall(@Nullable UUID accountId, @Nullable Integer requestedLevel, @Nullable Integer approvedLevel, @Nullable OptionsApprovalStatus status, @Nullable Integer pageSize, @Nullable String pageToken, ApiCallback _callback) throws ApiException
      Build call for requestListOptionsApprovals
      Parameters:
      accountId - Only return results for the specified account. (optional)
      requestedLevel - (optional)
      approvedLevel - (optional)
      status - Only return requests with the specified approval request status. (optional)
      pageSize - The maximum number of results to return. The default (and maximum value) is 1000. (optional, default to 1000)
      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)
      _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 The request was submitted successfully. -
      400 The request body is invalid. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      403 The correspondent entity does not have access to options approvals or the account does not exist. -
    • requestListOptionsApprovals

      public OptionsApprovalsList requestListOptionsApprovals(@Nullable UUID accountId, @Nullable Integer requestedLevel, @Nullable Integer approvedLevel, @Nullable OptionsApprovalStatus status, @Nullable Integer pageSize, @Nullable String pageToken) throws ApiException
      Retrieve options level approval requests (BETA) This endpoint retrieves options trading level approval requests. Query parameters can be specified to filter the results. If multiple query parameters are specified, the results will be filtered to include only those that match all of the specified parameters. Each query parameter can only be specified once.
      Parameters:
      accountId - Only return results for the specified account. (optional)
      requestedLevel - (optional)
      approvedLevel - (optional)
      status - Only return requests with the specified approval request status. (optional)
      pageSize - The maximum number of results to return. The default (and maximum value) is 1000. (optional, default to 1000)
      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)
      Returns:
      OptionsApprovalsList
      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 The request was submitted successfully. -
      400 The request body is invalid. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      403 The correspondent entity does not have access to options approvals or the account does not exist. -
    • requestListOptionsApprovalsWithHttpInfo

      public ApiResponse<OptionsApprovalsList> requestListOptionsApprovalsWithHttpInfo(@Nullable UUID accountId, @Nullable Integer requestedLevel, @Nullable Integer approvedLevel, @Nullable OptionsApprovalStatus status, @Nullable Integer pageSize, @Nullable String pageToken) throws ApiException
      Retrieve options level approval requests (BETA) This endpoint retrieves options trading level approval requests. Query parameters can be specified to filter the results. If multiple query parameters are specified, the results will be filtered to include only those that match all of the specified parameters. Each query parameter can only be specified once.
      Parameters:
      accountId - Only return results for the specified account. (optional)
      requestedLevel - (optional)
      approvedLevel - (optional)
      status - Only return requests with the specified approval request status. (optional)
      pageSize - The maximum number of results to return. The default (and maximum value) is 1000. (optional, default to 1000)
      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)
      Returns:
      ApiResponse<OptionsApprovalsList>
      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 The request was submitted successfully. -
      400 The request body is invalid. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      403 The correspondent entity does not have access to options approvals or the account does not exist. -
    • requestListOptionsApprovalsAsync

      public okhttp3.Call requestListOptionsApprovalsAsync(@Nullable UUID accountId, @Nullable Integer requestedLevel, @Nullable Integer approvedLevel, @Nullable OptionsApprovalStatus status, @Nullable Integer pageSize, @Nullable String pageToken, ApiCallback<OptionsApprovalsList> _callback) throws ApiException
      Retrieve options level approval requests (BETA) (asynchronously) This endpoint retrieves options trading level approval requests. Query parameters can be specified to filter the results. If multiple query parameters are specified, the results will be filtered to include only those that match all of the specified parameters. Each query parameter can only be specified once.
      Parameters:
      accountId - Only return results for the specified account. (optional)
      requestedLevel - (optional)
      approvedLevel - (optional)
      status - Only return requests with the specified approval request status. (optional)
      pageSize - The maximum number of results to return. The default (and maximum value) is 1000. (optional, default to 1000)
      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)
      _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 The request was submitted successfully. -
      400 The request body is invalid. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      403 The correspondent entity does not have access to options approvals or the account does not exist. -
    • requestOptionsForAccountCall

      public okhttp3.Call requestOptionsForAccountCall(@Nonnull UUID accountId, @Nonnull OptionsApprovalRequest optionsApprovalRequest, ApiCallback _callback) throws ApiException
      Build call for requestOptionsForAccount
      Parameters:
      accountId - Account identifier. (required)
      optionsApprovalRequest - (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 The request was submitted successfully. -
      400 The request body is invalid. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 The request body did not pass all validations. -
    • requestOptionsForAccount

      public OptionsApprovalResponse requestOptionsForAccount(@Nonnull UUID accountId, @Nonnull OptionsApprovalRequest optionsApprovalRequest) throws ApiException
      Request options trading for an account (BETA) This endpoint requests options trading for an account. Following submission, an assigned administrator will review the request. Upon approval, the account's options_approved_level parameter will be modified, granting the account the ability to participate in options trading. Note: This endpoint is only available for partners who have been enabled for Options BETA.
      Parameters:
      accountId - Account identifier. (required)
      optionsApprovalRequest - (required)
      Returns:
      OptionsApprovalResponse
      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 The request was submitted successfully. -
      400 The request body is invalid. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 The request body did not pass all validations. -
    • requestOptionsForAccountWithHttpInfo

      public ApiResponse<OptionsApprovalResponse> requestOptionsForAccountWithHttpInfo(@Nonnull UUID accountId, @Nonnull OptionsApprovalRequest optionsApprovalRequest) throws ApiException
      Request options trading for an account (BETA) This endpoint requests options trading for an account. Following submission, an assigned administrator will review the request. Upon approval, the account's options_approved_level parameter will be modified, granting the account the ability to participate in options trading. Note: This endpoint is only available for partners who have been enabled for Options BETA.
      Parameters:
      accountId - Account identifier. (required)
      optionsApprovalRequest - (required)
      Returns:
      ApiResponse<OptionsApprovalResponse>
      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 The request was submitted successfully. -
      400 The request body is invalid. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 The request body did not pass all validations. -
    • requestOptionsForAccountAsync

      public okhttp3.Call requestOptionsForAccountAsync(@Nonnull UUID accountId, @Nonnull OptionsApprovalRequest optionsApprovalRequest, ApiCallback<OptionsApprovalResponse> _callback) throws ApiException
      Request options trading for an account (BETA) (asynchronously) This endpoint requests options trading for an account. Following submission, an assigned administrator will review the request. Upon approval, the account's options_approved_level parameter will be modified, granting the account the ability to participate in options trading. Note: This endpoint is only available for partners who have been enabled for Options BETA.
      Parameters:
      accountId - Account identifier. (required)
      optionsApprovalRequest - (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 The request was submitted successfully. -
      400 The request body is invalid. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 The request body did not pass all validations. -