Class AgreementsApi
java.lang.Object
markets.alpaca.client.openapi.broker.api.AgreementsApi
Generated client for AgreementsApi 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
createAgreement: Create a Signed Agreement
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAgreement(CreateAgreementRequest createAgreementRequest) Create a Signed Agreement Create a signed agreement for a party.okhttp3.CallcreateAgreementAsync(CreateAgreementRequest createAgreementRequest, ApiCallback<SignedAgreement> _callback) Create a Signed Agreement (asynchronously) Create a signed agreement for a party.okhttp3.CallcreateAgreementCall(CreateAgreementRequest createAgreementRequest, ApiCallback _callback) Build call for createAgreementcreateAgreementWithHttpInfo(CreateAgreementRequest createAgreementRequest) Create a Signed Agreement Create a signed agreement for a party.intvoidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex)
-
Constructor Details
-
AgreementsApi
public AgreementsApi() -
AgreementsApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
createAgreementCall
public okhttp3.Call createAgreementCall(@Nonnull CreateAgreementRequest createAgreementRequest, ApiCallback _callback) throws ApiException Build call for createAgreement- Parameters:
createAgreementRequest- The signed agreement to record for the party. Include `account_id` for per-account agreements. (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 201 Agreement created successfully - 400 Invalid request. Common causes include an unknown party_id (party_not_found), missing required fields (including `party_id`), an invalid agreement type for the party, a missing `account_id` for a per-account agreement, or an invalid `signer_party_id` for a legal entity. - 403 The party does not belong to the authenticated correspondent. -
-
createAgreement
public SignedAgreement createAgreement(@Nonnull CreateAgreementRequest createAgreementRequest) throws ApiException Create a Signed Agreement Create a signed agreement for a party. Use this endpoint to record party-level agreements after party creation (for example `certifications_and_resolutions_statement` when it was not included on `POST /v1/parties`), or to record per-account agreements that require an `account_id`. Party-level agreements cannot be added via `PATCH /v1/parties/{id}` — use this endpoint instead. See [Business Trading Accounts — Party-Level Agreements](https://docs.alpaca.markets/us/docs/business-trading-accounts#party-level-agreements) for the party-first onboarding flow.- Parameters:
createAgreementRequest- The signed agreement to record for the party. Include `account_id` for per-account agreements. (required)- Returns:
- SignedAgreement
- 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 201 Agreement created successfully - 400 Invalid request. Common causes include an unknown party_id (party_not_found), missing required fields (including `party_id`), an invalid agreement type for the party, a missing `account_id` for a per-account agreement, or an invalid `signer_party_id` for a legal entity. - 403 The party does not belong to the authenticated correspondent. -
-
createAgreementWithHttpInfo
public ApiResponse<SignedAgreement> createAgreementWithHttpInfo(@Nonnull CreateAgreementRequest createAgreementRequest) throws ApiException Create a Signed Agreement Create a signed agreement for a party. Use this endpoint to record party-level agreements after party creation (for example `certifications_and_resolutions_statement` when it was not included on `POST /v1/parties`), or to record per-account agreements that require an `account_id`. Party-level agreements cannot be added via `PATCH /v1/parties/{id}` — use this endpoint instead. See [Business Trading Accounts — Party-Level Agreements](https://docs.alpaca.markets/us/docs/business-trading-accounts#party-level-agreements) for the party-first onboarding flow.- Parameters:
createAgreementRequest- The signed agreement to record for the party. Include `account_id` for per-account agreements. (required)- Returns:
- ApiResponse<SignedAgreement>
- 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 201 Agreement created successfully - 400 Invalid request. Common causes include an unknown party_id (party_not_found), missing required fields (including `party_id`), an invalid agreement type for the party, a missing `account_id` for a per-account agreement, or an invalid `signer_party_id` for a legal entity. - 403 The party does not belong to the authenticated correspondent. -
-
createAgreementAsync
public okhttp3.Call createAgreementAsync(@Nonnull CreateAgreementRequest createAgreementRequest, ApiCallback<SignedAgreement> _callback) throws ApiException Create a Signed Agreement (asynchronously) Create a signed agreement for a party. Use this endpoint to record party-level agreements after party creation (for example `certifications_and_resolutions_statement` when it was not included on `POST /v1/parties`), or to record per-account agreements that require an `account_id`. Party-level agreements cannot be added via `PATCH /v1/parties/{id}` — use this endpoint instead. See [Business Trading Accounts — Party-Level Agreements](https://docs.alpaca.markets/us/docs/business-trading-accounts#party-level-agreements) for the party-first onboarding flow.- Parameters:
createAgreementRequest- The signed agreement to record for the party. Include `account_id` for per-account agreements. (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 201 Agreement created successfully - 400 Invalid request. Common causes include an unknown party_id (party_not_found), missing required fields (including `party_id`), an invalid agreement type for the party, a missing `account_id` for a per-account agreement, or an invalid `signer_party_id` for a legal entity. - 403 The party does not belong to the authenticated correspondent. -
-