Class FundingApi

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

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

  • createACHRelationshipForAccount: Create an ACH Relationship
  • createIncomingWire: Simulate an Incoming Wire Transfer
  • createRecipientBank: Create a Bank Relationship for an Account
  • createTransferForAccount: Request a New Transfer
  • deleteACHRelationshipFromAccount: Delete an existing ACH relationship
  • deleteRecipientBank: Delete a Bank Relationship for an Account
  • deleteTransfer: Request to Close a Transfer
  • getAccountACHRelationships: Retrieve ACH Relationships for an account
  • getRecipientBanks: Retrieve Bank Relationships for an Account
  • getTransfersForAccount: Retrieve List of Transfers for an Account.
  • getV1JitSettlements: List all JIT Settlements
  • getV1JitSettlementsSingle: Get a single JIT settlement
  • getV1TransfersJitLedgerIdBalances: Retrieve JIT Ledger Balances
  • getV1TransfersJitLedgers: Retrieve JIT Ledgers
  • getV1TransfersJitLimits: Retrieve Daily Trading Limits
  • getV1TransfersJitReports: Retrieve JIT Reports
  • postV1JitSettlements: Create a new JIT settlement
  • Constructor Details

    • FundingApi

      public FundingApi()
    • FundingApi

      public FundingApi(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)
    • createACHRelationshipForAccountCall

      public okhttp3.Call createACHRelationshipForAccountCall(@Nonnull UUID accountId, @Nonnull CreateACHRelationshipRequest createACHRelationshipRequest, ApiCallback _callback) throws ApiException
      Build call for createACHRelationshipForAccount
      Parameters:
      accountId - Account identifier. (required)
      createACHRelationshipRequest - Create ACH Relationship (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 the newly created ACH Relationship entity. -
      400 Malformed input. -
      401 Client is not authorized for this operation. -
      409 The account already has an active relationship. -
    • createACHRelationshipForAccount

      public ACHRelationship createACHRelationshipForAccount(@Nonnull UUID accountId, @Nonnull CreateACHRelationshipRequest createACHRelationshipRequest) throws ApiException
      Create an ACH Relationship Create a new ACHRelationship for an account If successful, will return 200 code with a newly created ACH Relationship entity.
      Parameters:
      accountId - Account identifier. (required)
      createACHRelationshipRequest - Create ACH Relationship (required)
      Returns:
      ACHRelationship
      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 the newly created ACH Relationship entity. -
      400 Malformed input. -
      401 Client is not authorized for this operation. -
      409 The account already has an active relationship. -
    • createACHRelationshipForAccountWithHttpInfo

      public ApiResponse<ACHRelationship> createACHRelationshipForAccountWithHttpInfo(@Nonnull UUID accountId, @Nonnull CreateACHRelationshipRequest createACHRelationshipRequest) throws ApiException
      Create an ACH Relationship Create a new ACHRelationship for an account If successful, will return 200 code with a newly created ACH Relationship entity.
      Parameters:
      accountId - Account identifier. (required)
      createACHRelationshipRequest - Create ACH Relationship (required)
      Returns:
      ApiResponse<ACHRelationship>
      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 the newly created ACH Relationship entity. -
      400 Malformed input. -
      401 Client is not authorized for this operation. -
      409 The account already has an active relationship. -
    • createACHRelationshipForAccountAsync

      public okhttp3.Call createACHRelationshipForAccountAsync(@Nonnull UUID accountId, @Nonnull CreateACHRelationshipRequest createACHRelationshipRequest, ApiCallback<ACHRelationship> _callback) throws ApiException
      Create an ACH Relationship (asynchronously) Create a new ACHRelationship for an account If successful, will return 200 code with a newly created ACH Relationship entity.
      Parameters:
      accountId - Account identifier. (required)
      createACHRelationshipRequest - Create ACH Relationship (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 the newly created ACH Relationship entity. -
      400 Malformed input. -
      401 Client is not authorized for this operation. -
      409 The account already has an active relationship. -
    • createIncomingWireCall

      public okhttp3.Call createIncomingWireCall(@Nonnull CreateSimulatedIncomingWireRequest createSimulatedIncomingWireRequest, ApiCallback _callback) throws ApiException
      Build call for createIncomingWire
      Parameters:
      createSimulatedIncomingWireRequest - The amount, currency, and destination account of the simulated incoming wire. (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 simulated incoming wire was created. -
      400 The request body is malformed, for example invalid JSON. -
      403 The endpoint was called in production. It is only available in the sandbox environment. -
      404 No account with the account number in `wire_instructions` exists for your correspondent. -
      422 The request was rejected by validation. Common reasons include: - `invalid wire instructions: must be in format FFC TEST-987654321`: `wire_instructions` does not contain an FFC string. - `invalid correspondent used in wire instructions`: the correspondent in `wire_instructions` is not yours. - `currency does not match account's base currency`: `currency`, or the `USD` default, differs from the account's base currency. - `please contact support. currency is not supported for incoming_wire: <currency>`: `currency` is not a supported incoming wire currency. - `currency is not a valid currency`: `currency` is not a recognized currency code. - `amount should be greater than or equal to zero`: `amount` is 0 or negative. The amount must be greater than 0. -
      0 Unexpected error. -
    • createIncomingWire

      public SimulatedIncomingWire createIncomingWire(@Nonnull CreateSimulatedIncomingWireRequest createSimulatedIncomingWireRequest) throws ApiException
      Simulate an Incoming Wire Transfer Simulate an incoming wire transfer to fund one of your accounts, without a real sending bank. This endpoint is **only available in the sandbox environment**. Calling it in production returns `403`. In production, incoming wires are sent by the customer's bank and cannot be created through the API. Identify the destination account by including an FFC (For Further Credit) string `FFC <correspondent>-<account_number>` in `wire_instructions`, where `<correspondent>` is your 4-character correspondent code and `<account_number>` is the account's 9-character account number. `currency` defaults to `USD` and must match the account's base currency. Supported currencies are `AUD`, `CAD`, `CHF`, `EUR`, `GBP`, `JPY`, `NZD`, `SGD`, `TRY`, and `USD`. The wire is created with status `QUEUED` and processed asynchronously on the next worker run.
      Parameters:
      createSimulatedIncomingWireRequest - The amount, currency, and destination account of the simulated incoming wire. (required)
      Returns:
      SimulatedIncomingWire
      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 simulated incoming wire was created. -
      400 The request body is malformed, for example invalid JSON. -
      403 The endpoint was called in production. It is only available in the sandbox environment. -
      404 No account with the account number in `wire_instructions` exists for your correspondent. -
      422 The request was rejected by validation. Common reasons include: - `invalid wire instructions: must be in format FFC TEST-987654321`: `wire_instructions` does not contain an FFC string. - `invalid correspondent used in wire instructions`: the correspondent in `wire_instructions` is not yours. - `currency does not match account's base currency`: `currency`, or the `USD` default, differs from the account's base currency. - `please contact support. currency is not supported for incoming_wire: <currency>`: `currency` is not a supported incoming wire currency. - `currency is not a valid currency`: `currency` is not a recognized currency code. - `amount should be greater than or equal to zero`: `amount` is 0 or negative. The amount must be greater than 0. -
      0 Unexpected error. -
    • createIncomingWireWithHttpInfo

      public ApiResponse<SimulatedIncomingWire> createIncomingWireWithHttpInfo(@Nonnull CreateSimulatedIncomingWireRequest createSimulatedIncomingWireRequest) throws ApiException
      Simulate an Incoming Wire Transfer Simulate an incoming wire transfer to fund one of your accounts, without a real sending bank. This endpoint is **only available in the sandbox environment**. Calling it in production returns `403`. In production, incoming wires are sent by the customer's bank and cannot be created through the API. Identify the destination account by including an FFC (For Further Credit) string `FFC <correspondent>-<account_number>` in `wire_instructions`, where `<correspondent>` is your 4-character correspondent code and `<account_number>` is the account's 9-character account number. `currency` defaults to `USD` and must match the account's base currency. Supported currencies are `AUD`, `CAD`, `CHF`, `EUR`, `GBP`, `JPY`, `NZD`, `SGD`, `TRY`, and `USD`. The wire is created with status `QUEUED` and processed asynchronously on the next worker run.
      Parameters:
      createSimulatedIncomingWireRequest - The amount, currency, and destination account of the simulated incoming wire. (required)
      Returns:
      ApiResponse<SimulatedIncomingWire>
      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 simulated incoming wire was created. -
      400 The request body is malformed, for example invalid JSON. -
      403 The endpoint was called in production. It is only available in the sandbox environment. -
      404 No account with the account number in `wire_instructions` exists for your correspondent. -
      422 The request was rejected by validation. Common reasons include: - `invalid wire instructions: must be in format FFC TEST-987654321`: `wire_instructions` does not contain an FFC string. - `invalid correspondent used in wire instructions`: the correspondent in `wire_instructions` is not yours. - `currency does not match account's base currency`: `currency`, or the `USD` default, differs from the account's base currency. - `please contact support. currency is not supported for incoming_wire: <currency>`: `currency` is not a supported incoming wire currency. - `currency is not a valid currency`: `currency` is not a recognized currency code. - `amount should be greater than or equal to zero`: `amount` is 0 or negative. The amount must be greater than 0. -
      0 Unexpected error. -
    • createIncomingWireAsync

      public okhttp3.Call createIncomingWireAsync(@Nonnull CreateSimulatedIncomingWireRequest createSimulatedIncomingWireRequest, ApiCallback<SimulatedIncomingWire> _callback) throws ApiException
      Simulate an Incoming Wire Transfer (asynchronously) Simulate an incoming wire transfer to fund one of your accounts, without a real sending bank. This endpoint is **only available in the sandbox environment**. Calling it in production returns `403`. In production, incoming wires are sent by the customer's bank and cannot be created through the API. Identify the destination account by including an FFC (For Further Credit) string `FFC <correspondent>-<account_number>` in `wire_instructions`, where `<correspondent>` is your 4-character correspondent code and `<account_number>` is the account's 9-character account number. `currency` defaults to `USD` and must match the account's base currency. Supported currencies are `AUD`, `CAD`, `CHF`, `EUR`, `GBP`, `JPY`, `NZD`, `SGD`, `TRY`, and `USD`. The wire is created with status `QUEUED` and processed asynchronously on the next worker run.
      Parameters:
      createSimulatedIncomingWireRequest - The amount, currency, and destination account of the simulated incoming wire. (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 simulated incoming wire was created. -
      400 The request body is malformed, for example invalid JSON. -
      403 The endpoint was called in production. It is only available in the sandbox environment. -
      404 No account with the account number in `wire_instructions` exists for your correspondent. -
      422 The request was rejected by validation. Common reasons include: - `invalid wire instructions: must be in format FFC TEST-987654321`: `wire_instructions` does not contain an FFC string. - `invalid correspondent used in wire instructions`: the correspondent in `wire_instructions` is not yours. - `currency does not match account's base currency`: `currency`, or the `USD` default, differs from the account's base currency. - `please contact support. currency is not supported for incoming_wire: <currency>`: `currency` is not a supported incoming wire currency. - `currency is not a valid currency`: `currency` is not a recognized currency code. - `amount should be greater than or equal to zero`: `amount` is 0 or negative. The amount must be greater than 0. -
      0 Unexpected error. -
    • 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, @Nullable String idempotencyKey, ApiCallback _callback) throws ApiException
      Build call for createTransferForAccount
      Parameters:
      accountId - Account identifier. (required)
      createTransferRequest - (required)
      idempotencyKey - Optional client-generated key for safe retries and duplicate request detection. Always provide this header in production when an endpoint supports idempotency so timeouts, network errors, or 5xx responses can be retried without duplicate side effects. Strongly recommend a unique UUIDv7 or UUIDv4 value (36 characters including hyphens) for each logical operation. Do not reuse a key across operations. (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 Successfully requested a transfer. * Idempotency-Replayed -
      400 The request is malformed. Reasons include: - The request body is malformed (e.g. invalid JSON). - `idempotency key must be less than or equal to 36 characters` — the `Idempotency-Key` header is longer than 36 characters. - `idempotency key must be less than or equal to 36 characters; send the key without quotes` — the `Idempotency-Key` header is longer than 36 characters and wrapped in double quotes. - `idempotency key must not be empty` — the `Idempotency-Key` header is present but empty. - `idempotency key must be valid UTF-8` — the `Idempotency-Key` header is not valid UTF-8. -
      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. - `idempotency key was already used with a different request` — the `Idempotency-Key` was already used for this account with a request that differs in a compared field (see **Idempotency** above). -
    • createTransferForAccount

      public Transfer createTransferForAccount(@Nonnull UUID accountId, @Nonnull CreateTransferRequest createTransferRequest, @Nullable String idempotencyKey) 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. To fund an account with an incoming wire in sandbox, use [Simulate an Incoming Wire Transfer](https://docs.alpaca.markets/reference/createincomingwire) (`POST /v1/testing/incoming_wires`). For more on funding accounts in sandbox, see [this tutorial](https://alpaca.markets/learn/fund-broker-api/). **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests for the same account with the same key and an identical request create only one transfer. A subsequent request returns `200` with the previously created transfer, showing its current `status`, and the `Idempotency-Replayed: true` response header (no duplicate is created). If the same key is used for the same account with a different request, the API returns `422 Unprocessable Entity`. - **Key**: at most 36 characters; an empty key, a longer one or one that is not valid UTF-8 returns `400 Bad Request`. Send the bare value, without quotes: the key is compared exactly as sent and is case-sensitive. - **Identical request**: requests are compared on `transfer_type`, `direction`, `amount`, `relationship_id` / `bank_id`, `fee_payment_method`, `additional_information` and `ira`. Fields are compared as sent: an omitted field does not match the same field sent with its default value (for example `fee_payment_method` or `ira.tax_year`). `amount` and the withholding percentages are compared by value, so `100` matches `100.00`. - **Scope**: keys are scoped to the account in the path. The same key used for another account is independent and creates a separate transfer. - **Concurrent requests**: two requests for the same account with the same key never create two transfers. If they run at the same time, one creates the transfer and the other returns it, or returns `422` if its request differs. Rarely, it can fail a check while the first is still in progress; retry it with the same key. - **Failed requests**: a key is stored only when a transfer is created. If a request fails (for example with a `4xx` or `5xx` response) and no transfer was created, a retry with the same key, including one with a corrected request, is processed as a new request. **Recommended for production**: Always supply `Idempotency-Key` when creating transfers. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate transfers. Use a unique client-generated UUIDv7 or UUIDv4 value for each transfer.
      Parameters:
      accountId - Account identifier. (required)
      createTransferRequest - (required)
      idempotencyKey - Optional client-generated key for safe retries and duplicate request detection. Always provide this header in production when an endpoint supports idempotency so timeouts, network errors, or 5xx responses can be retried without duplicate side effects. Strongly recommend a unique UUIDv7 or UUIDv4 value (36 characters including hyphens) for each logical operation. Do not reuse a key across operations. (optional)
      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. * Idempotency-Replayed -
      400 The request is malformed. Reasons include: - The request body is malformed (e.g. invalid JSON). - `idempotency key must be less than or equal to 36 characters` — the `Idempotency-Key` header is longer than 36 characters. - `idempotency key must be less than or equal to 36 characters; send the key without quotes` — the `Idempotency-Key` header is longer than 36 characters and wrapped in double quotes. - `idempotency key must not be empty` — the `Idempotency-Key` header is present but empty. - `idempotency key must be valid UTF-8` — the `Idempotency-Key` header is not valid UTF-8. -
      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. - `idempotency key was already used with a different request` — the `Idempotency-Key` was already used for this account with a request that differs in a compared field (see **Idempotency** above). -
    • createTransferForAccountWithHttpInfo

      public ApiResponse<Transfer> createTransferForAccountWithHttpInfo(@Nonnull UUID accountId, @Nonnull CreateTransferRequest createTransferRequest, @Nullable String idempotencyKey) 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. To fund an account with an incoming wire in sandbox, use [Simulate an Incoming Wire Transfer](https://docs.alpaca.markets/reference/createincomingwire) (`POST /v1/testing/incoming_wires`). For more on funding accounts in sandbox, see [this tutorial](https://alpaca.markets/learn/fund-broker-api/). **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests for the same account with the same key and an identical request create only one transfer. A subsequent request returns `200` with the previously created transfer, showing its current `status`, and the `Idempotency-Replayed: true` response header (no duplicate is created). If the same key is used for the same account with a different request, the API returns `422 Unprocessable Entity`. - **Key**: at most 36 characters; an empty key, a longer one or one that is not valid UTF-8 returns `400 Bad Request`. Send the bare value, without quotes: the key is compared exactly as sent and is case-sensitive. - **Identical request**: requests are compared on `transfer_type`, `direction`, `amount`, `relationship_id` / `bank_id`, `fee_payment_method`, `additional_information` and `ira`. Fields are compared as sent: an omitted field does not match the same field sent with its default value (for example `fee_payment_method` or `ira.tax_year`). `amount` and the withholding percentages are compared by value, so `100` matches `100.00`. - **Scope**: keys are scoped to the account in the path. The same key used for another account is independent and creates a separate transfer. - **Concurrent requests**: two requests for the same account with the same key never create two transfers. If they run at the same time, one creates the transfer and the other returns it, or returns `422` if its request differs. Rarely, it can fail a check while the first is still in progress; retry it with the same key. - **Failed requests**: a key is stored only when a transfer is created. If a request fails (for example with a `4xx` or `5xx` response) and no transfer was created, a retry with the same key, including one with a corrected request, is processed as a new request. **Recommended for production**: Always supply `Idempotency-Key` when creating transfers. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate transfers. Use a unique client-generated UUIDv7 or UUIDv4 value for each transfer.
      Parameters:
      accountId - Account identifier. (required)
      createTransferRequest - (required)
      idempotencyKey - Optional client-generated key for safe retries and duplicate request detection. Always provide this header in production when an endpoint supports idempotency so timeouts, network errors, or 5xx responses can be retried without duplicate side effects. Strongly recommend a unique UUIDv7 or UUIDv4 value (36 characters including hyphens) for each logical operation. Do not reuse a key across operations. (optional)
      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. * Idempotency-Replayed -
      400 The request is malformed. Reasons include: - The request body is malformed (e.g. invalid JSON). - `idempotency key must be less than or equal to 36 characters` — the `Idempotency-Key` header is longer than 36 characters. - `idempotency key must be less than or equal to 36 characters; send the key without quotes` — the `Idempotency-Key` header is longer than 36 characters and wrapped in double quotes. - `idempotency key must not be empty` — the `Idempotency-Key` header is present but empty. - `idempotency key must be valid UTF-8` — the `Idempotency-Key` header is not valid UTF-8. -
      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. - `idempotency key was already used with a different request` — the `Idempotency-Key` was already used for this account with a request that differs in a compared field (see **Idempotency** above). -
    • createTransferForAccountAsync

      public okhttp3.Call createTransferForAccountAsync(@Nonnull UUID accountId, @Nonnull CreateTransferRequest createTransferRequest, @Nullable String idempotencyKey, 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. To fund an account with an incoming wire in sandbox, use [Simulate an Incoming Wire Transfer](https://docs.alpaca.markets/reference/createincomingwire) (`POST /v1/testing/incoming_wires`). For more on funding accounts in sandbox, see [this tutorial](https://alpaca.markets/learn/fund-broker-api/). **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests for the same account with the same key and an identical request create only one transfer. A subsequent request returns `200` with the previously created transfer, showing its current `status`, and the `Idempotency-Replayed: true` response header (no duplicate is created). If the same key is used for the same account with a different request, the API returns `422 Unprocessable Entity`. - **Key**: at most 36 characters; an empty key, a longer one or one that is not valid UTF-8 returns `400 Bad Request`. Send the bare value, without quotes: the key is compared exactly as sent and is case-sensitive. - **Identical request**: requests are compared on `transfer_type`, `direction`, `amount`, `relationship_id` / `bank_id`, `fee_payment_method`, `additional_information` and `ira`. Fields are compared as sent: an omitted field does not match the same field sent with its default value (for example `fee_payment_method` or `ira.tax_year`). `amount` and the withholding percentages are compared by value, so `100` matches `100.00`. - **Scope**: keys are scoped to the account in the path. The same key used for another account is independent and creates a separate transfer. - **Concurrent requests**: two requests for the same account with the same key never create two transfers. If they run at the same time, one creates the transfer and the other returns it, or returns `422` if its request differs. Rarely, it can fail a check while the first is still in progress; retry it with the same key. - **Failed requests**: a key is stored only when a transfer is created. If a request fails (for example with a `4xx` or `5xx` response) and no transfer was created, a retry with the same key, including one with a corrected request, is processed as a new request. **Recommended for production**: Always supply `Idempotency-Key` when creating transfers. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate transfers. Use a unique client-generated UUIDv7 or UUIDv4 value for each transfer.
      Parameters:
      accountId - Account identifier. (required)
      createTransferRequest - (required)
      idempotencyKey - Optional client-generated key for safe retries and duplicate request detection. Always provide this header in production when an endpoint supports idempotency so timeouts, network errors, or 5xx responses can be retried without duplicate side effects. Strongly recommend a unique UUIDv7 or UUIDv4 value (36 characters including hyphens) for each logical operation. Do not reuse a key across operations. (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 Successfully requested a transfer. * Idempotency-Replayed -
      400 The request is malformed. Reasons include: - The request body is malformed (e.g. invalid JSON). - `idempotency key must be less than or equal to 36 characters` — the `Idempotency-Key` header is longer than 36 characters. - `idempotency key must be less than or equal to 36 characters; send the key without quotes` — the `Idempotency-Key` header is longer than 36 characters and wrapped in double quotes. - `idempotency key must not be empty` — the `Idempotency-Key` header is present but empty. - `idempotency key must be valid UTF-8` — the `Idempotency-Key` header is not valid UTF-8. -
      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. - `idempotency key was already used with a different request` — the `Idempotency-Key` was already used for this account with a request that differs in a compared field (see **Idempotency** above). -
    • deleteACHRelationshipFromAccountCall

      public okhttp3.Call deleteACHRelationshipFromAccountCall(@Nonnull UUID accountId, @Nonnull UUID achRelationshipId, ApiCallback _callback) throws ApiException
      Build call for deleteACHRelationshipFromAccount
      Parameters:
      accountId - Account identifier. (required)
      achRelationshipId - ACH relationship 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
      204 Success (No Content) -
      400 the passed in account_id or relationship_id were invalid -
      404 Relationship Not Found -
    • deleteACHRelationshipFromAccount

      public void deleteACHRelationshipFromAccount(@Nonnull UUID accountId, @Nonnull UUID achRelationshipId) throws ApiException
      Delete an existing ACH relationship Delete an existing ACH relationship for an account
      Parameters:
      accountId - Account identifier. (required)
      achRelationshipId - ACH relationship identifier (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 (No Content) -
      400 the passed in account_id or relationship_id were invalid -
      404 Relationship Not Found -
    • deleteACHRelationshipFromAccountWithHttpInfo

      public ApiResponse<Void> deleteACHRelationshipFromAccountWithHttpInfo(@Nonnull UUID accountId, @Nonnull UUID achRelationshipId) throws ApiException
      Delete an existing ACH relationship Delete an existing ACH relationship for an account
      Parameters:
      accountId - Account identifier. (required)
      achRelationshipId - ACH relationship identifier (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 (No Content) -
      400 the passed in account_id or relationship_id were invalid -
      404 Relationship Not Found -
    • deleteACHRelationshipFromAccountAsync

      public okhttp3.Call deleteACHRelationshipFromAccountAsync(@Nonnull UUID accountId, @Nonnull UUID achRelationshipId, ApiCallback<Void> _callback) throws ApiException
      Delete an existing ACH relationship (asynchronously) Delete an existing ACH relationship for an account
      Parameters:
      accountId - Account identifier. (required)
      achRelationshipId - ACH relationship 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
      204 Success (No Content) -
      400 the passed in account_id or relationship_id were invalid -
      404 Relationship Not Found -
    • deleteRecipientBankCall

      public okhttp3.Call deleteRecipientBankCall(@Nonnull UUID accountId, @Nonnull UUID bankId, ApiCallback _callback) throws ApiException
      Build call for deleteRecipientBank
      Parameters:
      accountId - Account identifier. (required)
      bankId - (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 (No Content) -
      400 Bad Request -
      404 No Bank Relationship with the id specified by bank_id was found for this Account -
    • deleteRecipientBank

      public void deleteRecipientBank(@Nonnull UUID accountId, @Nonnull UUID bankId) throws ApiException
      Delete a Bank Relationship for an Account If successful, deletes Bank Relationship for an account
      Parameters:
      accountId - Account identifier. (required)
      bankId - (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 (No Content) -
      400 Bad Request -
      404 No Bank Relationship with the id specified by bank_id was found for this Account -
    • deleteRecipientBankWithHttpInfo

      public ApiResponse<Void> deleteRecipientBankWithHttpInfo(@Nonnull UUID accountId, @Nonnull UUID bankId) throws ApiException
      Delete a Bank Relationship for an Account If successful, deletes Bank Relationship for an account
      Parameters:
      accountId - Account identifier. (required)
      bankId - (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 (No Content) -
      400 Bad Request -
      404 No Bank Relationship with the id specified by bank_id was found for this Account -
    • deleteRecipientBankAsync

      public okhttp3.Call deleteRecipientBankAsync(@Nonnull UUID accountId, @Nonnull UUID bankId, ApiCallback<Void> _callback) throws ApiException
      Delete a Bank Relationship for an Account (asynchronously) If successful, deletes Bank Relationship for an account
      Parameters:
      accountId - Account identifier. (required)
      bankId - (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 (No Content) -
      400 Bad Request -
      404 No Bank Relationship with the id specified by bank_id was found for this Account -
    • deleteTransferCall

      public okhttp3.Call deleteTransferCall(@Nonnull UUID accountId, @Nonnull UUID transferId, ApiCallback _callback) throws ApiException
      Build call for deleteTransfer
      Parameters:
      accountId - Account identifier. (required)
      transferId - Transfer 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 Success -
      404 Transfer Not Found -
    • deleteTransfer

      public void deleteTransfer(@Nonnull UUID accountId, @Nonnull UUID transferId) throws ApiException
      Request to Close a Transfer Request to close a transfer
      Parameters:
      accountId - Account identifier. (required)
      transferId - Transfer identifier (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
      200 Success -
      404 Transfer Not Found -
    • deleteTransferWithHttpInfo

      public ApiResponse<Void> deleteTransferWithHttpInfo(@Nonnull UUID accountId, @Nonnull UUID transferId) throws ApiException
      Request to Close a Transfer Request to close a transfer
      Parameters:
      accountId - Account identifier. (required)
      transferId - Transfer identifier (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
      200 Success -
      404 Transfer Not Found -
    • deleteTransferAsync

      public okhttp3.Call deleteTransferAsync(@Nonnull UUID accountId, @Nonnull UUID transferId, ApiCallback<Void> _callback) throws ApiException
      Request to Close a Transfer (asynchronously) Request to close a transfer
      Parameters:
      accountId - Account identifier. (required)
      transferId - Transfer 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 Success -
      404 Transfer Not Found -
    • getAccountACHRelationshipsCall

      public okhttp3.Call getAccountACHRelationshipsCall(@Nonnull UUID accountId, @Nullable String statuses, ApiCallback _callback) throws ApiException
      Build call for getAccountACHRelationships
      Parameters:
      accountId - Account identifier. (required)
      statuses - Comma-separated status values (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 -
    • getAccountACHRelationships

      public List<ACHRelationship> getAccountACHRelationships(@Nonnull UUID accountId, @Nullable String statuses) throws ApiException
      Retrieve ACH Relationships for an account Returns a list of ACH Relationships for an account
      Parameters:
      accountId - Account identifier. (required)
      statuses - Comma-separated status values (optional)
      Returns:
      List<ACHRelationship>
      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 -
    • getAccountACHRelationshipsWithHttpInfo

      public ApiResponse<List<ACHRelationship>> getAccountACHRelationshipsWithHttpInfo(@Nonnull UUID accountId, @Nullable String statuses) throws ApiException
      Retrieve ACH Relationships for an account Returns a list of ACH Relationships for an account
      Parameters:
      accountId - Account identifier. (required)
      statuses - Comma-separated status values (optional)
      Returns:
      ApiResponse<List<ACHRelationship>>
      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 -
    • getAccountACHRelationshipsAsync

      public okhttp3.Call getAccountACHRelationshipsAsync(@Nonnull UUID accountId, @Nullable String statuses, ApiCallback<List<ACHRelationship>> _callback) throws ApiException
      Retrieve ACH Relationships for an account (asynchronously) Returns a list of ACH Relationships for an account
      Parameters:
      accountId - Account identifier. (required)
      statuses - Comma-separated status values (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 -
    • 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. -
    • getTransfersForAccountCall

      public okhttp3.Call getTransfersForAccountCall(@Nonnull UUID accountId, @Nullable String direction, @Nullable Integer limit, @Nullable Integer offset, ApiCallback _callback) throws ApiException
      Build call for getTransfersForAccount
      Parameters:
      accountId - Account identifier. (required)
      direction - INCOMING or OUTGOING (optional)
      limit - (optional)
      offset - (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. -
    • getTransfersForAccount

      public List<Transfer> getTransfersForAccount(@Nonnull UUID accountId, @Nullable String direction, @Nullable Integer limit, @Nullable Integer offset) throws ApiException
      Retrieve List of Transfers for an Account. You can query a list of transfers for an account. You can filter requested transfers by values such as direction and status. Returns a list of transfer entities ordered by created_at
      Parameters:
      accountId - Account identifier. (required)
      direction - INCOMING or OUTGOING (optional)
      limit - (optional)
      offset - (optional)
      Returns:
      List<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 Success. -
    • getTransfersForAccountWithHttpInfo

      public ApiResponse<List<Transfer>> getTransfersForAccountWithHttpInfo(@Nonnull UUID accountId, @Nullable String direction, @Nullable Integer limit, @Nullable Integer offset) throws ApiException
      Retrieve List of Transfers for an Account. You can query a list of transfers for an account. You can filter requested transfers by values such as direction and status. Returns a list of transfer entities ordered by created_at
      Parameters:
      accountId - Account identifier. (required)
      direction - INCOMING or OUTGOING (optional)
      limit - (optional)
      offset - (optional)
      Returns:
      ApiResponse<List<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 Success. -
    • getTransfersForAccountAsync

      public okhttp3.Call getTransfersForAccountAsync(@Nonnull UUID accountId, @Nullable String direction, @Nullable Integer limit, @Nullable Integer offset, ApiCallback<List<Transfer>> _callback) throws ApiException
      Retrieve List of Transfers for an Account. (asynchronously) You can query a list of transfers for an account. You can filter requested transfers by values such as direction and status. Returns a list of transfer entities ordered by created_at
      Parameters:
      accountId - Account identifier. (required)
      direction - INCOMING or OUTGOING (optional)
      limit - (optional)
      offset - (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. -
    • getV1JitSettlementsCall

      public okhttp3.Call getV1JitSettlementsCall(@Nullable String statuses, ApiCallback _callback) throws ApiException
      Build call for getV1JitSettlements
      Parameters:
      statuses - comma delimited list of statuses to use as a filter (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. -
      0 Error response. -
    • getV1JitSettlements

      public SettlementsResponse getV1JitSettlements(@Nullable String statuses) throws ApiException
      List all JIT Settlements Returns all JIT settlements filtered by status if provided.
      Parameters:
      statuses - comma delimited list of statuses to use as a filter (optional)
      Returns:
      SettlementsResponse
      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. -
      0 Error response. -
    • getV1JitSettlementsWithHttpInfo

      public ApiResponse<SettlementsResponse> getV1JitSettlementsWithHttpInfo(@Nullable String statuses) throws ApiException
      List all JIT Settlements Returns all JIT settlements filtered by status if provided.
      Parameters:
      statuses - comma delimited list of statuses to use as a filter (optional)
      Returns:
      ApiResponse<SettlementsResponse>
      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. -
      0 Error response. -
    • getV1JitSettlementsAsync

      public okhttp3.Call getV1JitSettlementsAsync(@Nullable String statuses, ApiCallback<SettlementsResponse> _callback) throws ApiException
      List all JIT Settlements (asynchronously) Returns all JIT settlements filtered by status if provided.
      Parameters:
      statuses - comma delimited list of statuses to use as a filter (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. -
      0 Error response. -
    • getV1JitSettlementsSingleCall

      public okhttp3.Call getV1JitSettlementsSingleCall(@Nonnull UUID settlementId, ApiCallback _callback) throws ApiException
      Build call for getV1JitSettlementsSingle
      Parameters:
      settlementId - ID of the JIT settlement (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 Successful response. -
      0 Error response. -
    • getV1JitSettlementsSingle

      public SettlementResponse getV1JitSettlementsSingle(@Nonnull UUID settlementId) throws ApiException
      Get a single JIT settlement Returns the JIT settlement specified by the path parameter.
      Parameters:
      settlementId - ID of the JIT settlement (required)
      Returns:
      SettlementResponse
      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. -
      0 Error response. -
    • getV1JitSettlementsSingleWithHttpInfo

      public ApiResponse<SettlementResponse> getV1JitSettlementsSingleWithHttpInfo(@Nonnull UUID settlementId) throws ApiException
      Get a single JIT settlement Returns the JIT settlement specified by the path parameter.
      Parameters:
      settlementId - ID of the JIT settlement (required)
      Returns:
      ApiResponse<SettlementResponse>
      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. -
      0 Error response. -
    • getV1JitSettlementsSingleAsync

      public okhttp3.Call getV1JitSettlementsSingleAsync(@Nonnull UUID settlementId, ApiCallback<SettlementResponse> _callback) throws ApiException
      Get a single JIT settlement (asynchronously) Returns the JIT settlement specified by the path parameter.
      Parameters:
      settlementId - ID of the JIT settlement (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 Successful response. -
      0 Error response. -
    • getV1TransfersJitLedgerIdBalancesCall

      public okhttp3.Call getV1TransfersJitLedgerIdBalancesCall(@Nonnull String ledgerId, @Nullable LocalDate startDate, @Nullable LocalDate endDate, ApiCallback _callback) throws ApiException
      Build call for getV1TransfersJitLedgerIdBalances
      Parameters:
      ledgerId - (required)
      startDate - The start date (inclusive) of the ledgerbalances and activities. (optional)
      endDate - The end date (inclusive) of the ledgerbalances and activities. (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 OK -
    • getV1TransfersJitLedgerIdBalances

      public GetV1TransfersJitLedgerIdBalances200Response getV1TransfersJitLedgerIdBalances(@Nonnull String ledgerId, @Nullable LocalDate startDate, @Nullable LocalDate endDate) throws ApiException
      Retrieve JIT Ledger Balances Returns an array of objects that correspond to each ledger account.
      Parameters:
      ledgerId - (required)
      startDate - The start date (inclusive) of the ledgerbalances and activities. (optional)
      endDate - The end date (inclusive) of the ledgerbalances and activities. (optional)
      Returns:
      GetV1TransfersJitLedgerIdBalances200Response
      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 -
    • getV1TransfersJitLedgerIdBalancesWithHttpInfo

      public ApiResponse<GetV1TransfersJitLedgerIdBalances200Response> getV1TransfersJitLedgerIdBalancesWithHttpInfo(@Nonnull String ledgerId, @Nullable LocalDate startDate, @Nullable LocalDate endDate) throws ApiException
      Retrieve JIT Ledger Balances Returns an array of objects that correspond to each ledger account.
      Parameters:
      ledgerId - (required)
      startDate - The start date (inclusive) of the ledgerbalances and activities. (optional)
      endDate - The end date (inclusive) of the ledgerbalances and activities. (optional)
      Returns:
      ApiResponse<GetV1TransfersJitLedgerIdBalances200Response>
      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 -
    • getV1TransfersJitLedgerIdBalancesAsync

      public okhttp3.Call getV1TransfersJitLedgerIdBalancesAsync(@Nonnull String ledgerId, @Nullable LocalDate startDate, @Nullable LocalDate endDate, ApiCallback<GetV1TransfersJitLedgerIdBalances200Response> _callback) throws ApiException
      Retrieve JIT Ledger Balances (asynchronously) Returns an array of objects that correspond to each ledger account.
      Parameters:
      ledgerId - (required)
      startDate - The start date (inclusive) of the ledgerbalances and activities. (optional)
      endDate - The end date (inclusive) of the ledgerbalances and activities. (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 OK -
    • getV1TransfersJitLedgersCall

      public okhttp3.Call getV1TransfersJitLedgersCall(ApiCallback _callback) throws ApiException
      Build call for getV1TransfersJitLedgers
      Parameters:
      _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 -
    • getV1TransfersJitLedgers

      public List<JITLedgerAccount> getV1TransfersJitLedgers() throws ApiException
      Retrieve JIT Ledgers Returns an array of objects that correspond to each ledger account, each of which contains the following attributes.
      Returns:
      List<JITLedgerAccount>
      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 -
    • getV1TransfersJitLedgersWithHttpInfo

      public ApiResponse<List<JITLedgerAccount>> getV1TransfersJitLedgersWithHttpInfo() throws ApiException
      Retrieve JIT Ledgers Returns an array of objects that correspond to each ledger account, each of which contains the following attributes.
      Returns:
      ApiResponse<List<JITLedgerAccount>>
      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 -
    • getV1TransfersJitLedgersAsync

      public okhttp3.Call getV1TransfersJitLedgersAsync(ApiCallback<List<JITLedgerAccount>> _callback) throws ApiException
      Retrieve JIT Ledgers (asynchronously) Returns an array of objects that correspond to each ledger account, each of which contains the following attributes.
      Parameters:
      _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 -
    • getV1TransfersJitLimitsCall

      public okhttp3.Call getV1TransfersJitLimitsCall(ApiCallback _callback) throws ApiException
      Build call for getV1TransfersJitLimits
      Parameters:
      _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 the JIT Securities Daily Trading Limit Object based off of real time calculations. -
    • getV1TransfersJitLimits

      public DailyTradingLimit getV1TransfersJitLimits() throws ApiException
      Retrieve Daily Trading Limits The JIT Securities daily trading limit is set at the correspondent level and is used as the limit for the total amount due to Alpaca on the date of settlement. The limit in use returns the real time usage of this limit and is calculated by taking the net of trade and non-trade activity inflows and outflows. If the limit in use reaches the daily net limit, further purchasing activity will be halted, however, the limit can be adjusted by reaching out to Alpaca with the proposed new limit and the reason for the change. The limit is reset at the start of every trading day at 8.00 PM ET
      Returns:
      DailyTradingLimit
      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 the JIT Securities Daily Trading Limit Object based off of real time calculations. -
    • getV1TransfersJitLimitsWithHttpInfo

      public ApiResponse<DailyTradingLimit> getV1TransfersJitLimitsWithHttpInfo() throws ApiException
      Retrieve Daily Trading Limits The JIT Securities daily trading limit is set at the correspondent level and is used as the limit for the total amount due to Alpaca on the date of settlement. The limit in use returns the real time usage of this limit and is calculated by taking the net of trade and non-trade activity inflows and outflows. If the limit in use reaches the daily net limit, further purchasing activity will be halted, however, the limit can be adjusted by reaching out to Alpaca with the proposed new limit and the reason for the change. The limit is reset at the start of every trading day at 8.00 PM ET
      Returns:
      ApiResponse<DailyTradingLimit>
      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 the JIT Securities Daily Trading Limit Object based off of real time calculations. -
    • getV1TransfersJitLimitsAsync

      public okhttp3.Call getV1TransfersJitLimitsAsync(ApiCallback<DailyTradingLimit> _callback) throws ApiException
      Retrieve Daily Trading Limits (asynchronously) The JIT Securities daily trading limit is set at the correspondent level and is used as the limit for the total amount due to Alpaca on the date of settlement. The limit in use returns the real time usage of this limit and is calculated by taking the net of trade and non-trade activity inflows and outflows. If the limit in use reaches the daily net limit, further purchasing activity will be halted, however, the limit can be adjusted by reaching out to Alpaca with the proposed new limit and the reason for the change. The limit is reset at the start of every trading day at 8.00 PM ET
      Parameters:
      _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 the JIT Securities Daily Trading Limit Object based off of real time calculations. -
    • getV1TransfersJitReportsCall

      public okhttp3.Call getV1TransfersJitReportsCall(@Nonnull JITReportType reportType, @Nonnull LocalDate systemDate, @Nullable String assetClass, @Nullable String responseType, ApiCallback _callback) throws ApiException
      Build call for getV1TransfersJitReports
      Parameters:
      reportType - The type of report you want to get. (required)
      systemDate - Date of file generation. (required)
      assetClass - The asset class to retrieve for. (optional)
      responseType - Controls how the report is returned. Use inline to return the report content directly in the response. Use download_url to return a temporary signed URL that can be used to download the generated report. If omitted, the default value is inline. (optional, default to inline)
      _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 report file when response_type is inline or omitted, or a temporary download link when response_type is download_url. * Content-Disposition - Present when the report file is returned inline. Names the file with the same value that download_url returns in `filename`.
    • getV1TransfersJitReports

      public JITReportDownloadURL getV1TransfersJitReports(@Nonnull JITReportType reportType, @Nonnull LocalDate systemDate, @Nullable String assetClass, @Nullable String responseType) throws ApiException
      Retrieve JIT Reports Retrieves a JIT report for the requested report type and system date. By default, the report is returned inline. For large reports, use response_type=download_url to receive a temporary signed download URL. Generated SDKs return the JSON response. To retrieve a report through an SDK, set response_type=download_url and download the file from `url`.
      Parameters:
      reportType - The type of report you want to get. (required)
      systemDate - Date of file generation. (required)
      assetClass - The asset class to retrieve for. (optional)
      responseType - Controls how the report is returned. Use inline to return the report content directly in the response. Use download_url to return a temporary signed URL that can be used to download the generated report. If omitted, the default value is inline. (optional, default to inline)
      Returns:
      JITReportDownloadURL
      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 report file when response_type is inline or omitted, or a temporary download link when response_type is download_url. * Content-Disposition - Present when the report file is returned inline. Names the file with the same value that download_url returns in `filename`.
    • getV1TransfersJitReportsWithHttpInfo

      public ApiResponse<JITReportDownloadURL> getV1TransfersJitReportsWithHttpInfo(@Nonnull JITReportType reportType, @Nonnull LocalDate systemDate, @Nullable String assetClass, @Nullable String responseType) throws ApiException
      Retrieve JIT Reports Retrieves a JIT report for the requested report type and system date. By default, the report is returned inline. For large reports, use response_type=download_url to receive a temporary signed download URL. Generated SDKs return the JSON response. To retrieve a report through an SDK, set response_type=download_url and download the file from `url`.
      Parameters:
      reportType - The type of report you want to get. (required)
      systemDate - Date of file generation. (required)
      assetClass - The asset class to retrieve for. (optional)
      responseType - Controls how the report is returned. Use inline to return the report content directly in the response. Use download_url to return a temporary signed URL that can be used to download the generated report. If omitted, the default value is inline. (optional, default to inline)
      Returns:
      ApiResponse<JITReportDownloadURL>
      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 report file when response_type is inline or omitted, or a temporary download link when response_type is download_url. * Content-Disposition - Present when the report file is returned inline. Names the file with the same value that download_url returns in `filename`.
    • getV1TransfersJitReportsAsync

      public okhttp3.Call getV1TransfersJitReportsAsync(@Nonnull JITReportType reportType, @Nonnull LocalDate systemDate, @Nullable String assetClass, @Nullable String responseType, ApiCallback<JITReportDownloadURL> _callback) throws ApiException
      Retrieve JIT Reports (asynchronously) Retrieves a JIT report for the requested report type and system date. By default, the report is returned inline. For large reports, use response_type=download_url to receive a temporary signed download URL. Generated SDKs return the JSON response. To retrieve a report through an SDK, set response_type=download_url and download the file from `url`.
      Parameters:
      reportType - The type of report you want to get. (required)
      systemDate - Date of file generation. (required)
      assetClass - The asset class to retrieve for. (optional)
      responseType - Controls how the report is returned. Use inline to return the report content directly in the response. Use download_url to return a temporary signed URL that can be used to download the generated report. If omitted, the default value is inline. (optional, default to inline)
      _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 report file when response_type is inline or omitted, or a temporary download link when response_type is download_url. * Content-Disposition - Present when the report file is returned inline. Names the file with the same value that download_url returns in `filename`.
    • postV1JitSettlementsCall

      public okhttp3.Call postV1JitSettlementsCall(@Nonnull CreateJITSettlementRequest createJITSettlementRequest, ApiCallback _callback) throws ApiException
      Build call for postV1JitSettlements
      Parameters:
      createJITSettlementRequest - details of the JIT settlement request (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 Settlement created. -
      0 Error response. -
    • postV1JitSettlements

      public SettlementResponse postV1JitSettlements(@Nonnull CreateJITSettlementRequest createJITSettlementRequest) throws ApiException
      Create a new JIT settlement Creates a new JIT settlement, which will trigger the reconciliation process for all included accounts. There is a limit of 150,000 accounts per settlement. If more than 150,000 accounts need to be settled, they should be batched in multiple settlements.
      Parameters:
      createJITSettlementRequest - details of the JIT settlement request (required)
      Returns:
      SettlementResponse
      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 Settlement created. -
      0 Error response. -
    • postV1JitSettlementsWithHttpInfo

      public ApiResponse<SettlementResponse> postV1JitSettlementsWithHttpInfo(@Nonnull CreateJITSettlementRequest createJITSettlementRequest) throws ApiException
      Create a new JIT settlement Creates a new JIT settlement, which will trigger the reconciliation process for all included accounts. There is a limit of 150,000 accounts per settlement. If more than 150,000 accounts need to be settled, they should be batched in multiple settlements.
      Parameters:
      createJITSettlementRequest - details of the JIT settlement request (required)
      Returns:
      ApiResponse<SettlementResponse>
      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 Settlement created. -
      0 Error response. -
    • postV1JitSettlementsAsync

      public okhttp3.Call postV1JitSettlementsAsync(@Nonnull CreateJITSettlementRequest createJITSettlementRequest, ApiCallback<SettlementResponse> _callback) throws ApiException
      Create a new JIT settlement (asynchronously) Creates a new JIT settlement, which will trigger the reconciliation process for all included accounts. There is a limit of 150,000 accounts per settlement. If more than 150,000 accounts need to be settled, they should be batched in multiple settlements.
      Parameters:
      createJITSettlementRequest - details of the JIT settlement request (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 Settlement created. -
      0 Error response. -