Class JournalsApi
java.lang.Object
markets.alpaca.client.openapi.broker.api.JournalsApi
Generated client for JournalsApi 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
createBatchJournal: Create a Batch Journal Transaction (One-to-Many)createJournal: Create a JournaldeleteJournalById: Cancel a Pending JournalgetAllJournals: Retrieve a List JournalsgetV1JournalsJournalId: Retrieve a Single Journal EntrypostV1JournalsReverseBatch: Create a Reverse Batch Journal Transaction (Many-to-One)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBatchJournal(BatchJournalRequest batchJournalRequest, String idempotencyKey) Create a Batch Journal Transaction (One-to-Many) You can create a batch of journal requests by using this endpoint.okhttp3.CallcreateBatchJournalAsync(BatchJournalRequest batchJournalRequest, String idempotencyKey, ApiCallback<List<BatchJournalResponse>> _callback) Create a Batch Journal Transaction (One-to-Many) (asynchronously) You can create a batch of journal requests by using this endpoint.okhttp3.CallcreateBatchJournalCall(BatchJournalRequest batchJournalRequest, String idempotencyKey, ApiCallback _callback) Build call for createBatchJournalcreateBatchJournalWithHttpInfo(BatchJournalRequest batchJournalRequest, String idempotencyKey) Create a Batch Journal Transaction (One-to-Many) You can create a batch of journal requests by using this endpoint.createJournal(CreateJournalRequest createJournalRequest, String idempotencyKey) Create a Journal A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`.okhttp3.CallcreateJournalAsync(CreateJournalRequest createJournalRequest, String idempotencyKey, ApiCallback<Journal> _callback) Create a Journal (asynchronously) A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`.okhttp3.CallcreateJournalCall(CreateJournalRequest createJournalRequest, String idempotencyKey, ApiCallback _callback) Build call for createJournalcreateJournalWithHttpInfo(CreateJournalRequest createJournalRequest, String idempotencyKey) Create a Journal A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`.voiddeleteJournalById(UUID journalId) Cancel a Pending Journal You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete.okhttp3.CalldeleteJournalByIdAsync(UUID journalId, ApiCallback<Void> _callback) Cancel a Pending Journal (asynchronously) You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete.okhttp3.CalldeleteJournalByIdCall(UUID journalId, ApiCallback _callback) Build call for deleteJournalByIddeleteJournalByIdWithHttpInfo(UUID journalId) Cancel a Pending Journal You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete.getAllJournals(LocalDate after, LocalDate before, JournalStatus status, String entryType, UUID toAccount, UUID fromAccount, Integer limit) Retrieve a List Journals Returns an array of journal objects.okhttp3.CallgetAllJournalsAsync(LocalDate after, LocalDate before, JournalStatus status, String entryType, UUID toAccount, UUID fromAccount, Integer limit, ApiCallback<List<Journal>> _callback) Retrieve a List Journals (asynchronously) Returns an array of journal objects.okhttp3.CallgetAllJournalsCall(LocalDate after, LocalDate before, JournalStatus status, String entryType, UUID toAccount, UUID fromAccount, Integer limit, ApiCallback _callback) Build call for getAllJournalsgetAllJournalsWithHttpInfo(LocalDate after, LocalDate before, JournalStatus status, String entryType, UUID toAccount, UUID fromAccount, Integer limit) Retrieve a List Journals Returns an array of journal objects.intgetV1JournalsJournalId(UUID journalId) Retrieve a Single Journal Entry You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id.okhttp3.CallgetV1JournalsJournalIdAsync(UUID journalId, ApiCallback<Journal> _callback) Retrieve a Single Journal Entry (asynchronously) You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id.okhttp3.CallgetV1JournalsJournalIdCall(UUID journalId, ApiCallback _callback) Build call for getV1JournalsJournalIdgetV1JournalsJournalIdWithHttpInfo(UUID journalId) Retrieve a Single Journal Entry You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id.postV1JournalsReverseBatch(ReverseBatchJournalRequest reverseBatchJournalRequest) Create a Reverse Batch Journal Transaction (Many-to-One) You can also create a batch journal request by using the following endpoint.okhttp3.CallpostV1JournalsReverseBatchAsync(ReverseBatchJournalRequest reverseBatchJournalRequest, ApiCallback<List<BatchJournalResponse>> _callback) Create a Reverse Batch Journal Transaction (Many-to-One) (asynchronously) You can also create a batch journal request by using the following endpoint.okhttp3.CallpostV1JournalsReverseBatchCall(ReverseBatchJournalRequest reverseBatchJournalRequest, ApiCallback _callback) Build call for postV1JournalsReverseBatchpostV1JournalsReverseBatchWithHttpInfo(ReverseBatchJournalRequest reverseBatchJournalRequest) Create a Reverse Batch Journal Transaction (Many-to-One) You can also create a batch journal request by using the following endpoint.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex)
-
Constructor Details
-
JournalsApi
public JournalsApi() -
JournalsApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
createBatchJournalCall
public okhttp3.Call createBatchJournalCall(@Nonnull BatchJournalRequest batchJournalRequest, @Nullable String idempotencyKey, ApiCallback _callback) throws ApiException Build call for createBatchJournal- Parameters:
batchJournalRequest- (required)idempotencyKey- The unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal batch instead of creating a new one. Use a client-generated value (e.g. UUID) per logical batch. Strongly recommended for production to prevent duplicate journal batches on retries. (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 journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. - 422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
-
createBatchJournal
public List<BatchJournalResponse> createBatchJournal(@Nonnull BatchJournalRequest batchJournalRequest, @Nullable String idempotencyKey) throws ApiException Create a Batch Journal Transaction (One-to-Many) You can create a batch of journal requests by using this endpoint. This is enabled on JNLC type Journals for now only. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one batch. A subsequent request returns the previously created batch with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journal batches. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate batches. Use a client-generated unique value (e.g. UUID).- Parameters:
batchJournalRequest- (required)idempotencyKey- The unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal batch instead of creating a new one. Use a client-generated value (e.g. UUID) per logical batch. Strongly recommended for production to prevent duplicate journal batches on retries. (optional)- Returns:
- List<BatchJournalResponse>
- 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 journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. - 422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
-
createBatchJournalWithHttpInfo
public ApiResponse<List<BatchJournalResponse>> createBatchJournalWithHttpInfo(@Nonnull BatchJournalRequest batchJournalRequest, @Nullable String idempotencyKey) throws ApiException Create a Batch Journal Transaction (One-to-Many) You can create a batch of journal requests by using this endpoint. This is enabled on JNLC type Journals for now only. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one batch. A subsequent request returns the previously created batch with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journal batches. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate batches. Use a client-generated unique value (e.g. UUID).- Parameters:
batchJournalRequest- (required)idempotencyKey- The unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal batch instead of creating a new one. Use a client-generated value (e.g. UUID) per logical batch. Strongly recommended for production to prevent duplicate journal batches on retries. (optional)- Returns:
- ApiResponse<List<BatchJournalResponse>>
- 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 journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. - 422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
-
createBatchJournalAsync
public okhttp3.Call createBatchJournalAsync(@Nonnull BatchJournalRequest batchJournalRequest, @Nullable String idempotencyKey, ApiCallback<List<BatchJournalResponse>> _callback) throws ApiException Create a Batch Journal Transaction (One-to-Many) (asynchronously) You can create a batch of journal requests by using this endpoint. This is enabled on JNLC type Journals for now only. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one batch. A subsequent request returns the previously created batch with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journal batches. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate batches. Use a client-generated unique value (e.g. UUID).- Parameters:
batchJournalRequest- (required)idempotencyKey- The unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal batch instead of creating a new one. Use a client-generated value (e.g. UUID) per logical batch. Strongly recommended for production to prevent duplicate journal batches on retries. (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 journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. - 422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
-
createJournalCall
public okhttp3.Call createJournalCall(@Nonnull CreateJournalRequest createJournalRequest, @Nullable String idempotencyKey, ApiCallback _callback) throws ApiException Build call for createJournal- Parameters:
createJournalRequest- (required)idempotencyKey- Unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal instead of creating a new one. Use a client-generated value (e.g. UUID) per logical journal. Strongly recommended for production to prevent duplicate journals on retries. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- HTTP Response Details:
Response Details Status Code Description Response Headers 200 The New Journal object - 400 One of the parameters is invalid. - 403 The amount requested to move is not available. - 404 One of the account is not found. - 422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
-
createJournal
public Journal createJournal(@Nonnull CreateJournalRequest createJournalRequest, @Nullable String idempotencyKey) throws ApiException Create a Journal A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`. Generally, journal requests are subject to approval and starts from the `pending` status. The status changes are propagated through the Event API. Under certain conditions agreed for the partner, such journal transactions that meet the criteria are executed right away. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one journal. A subsequent request returns the previously created journal with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journals. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate journals. Use a client-generated unique value (e.g. UUID).- Parameters:
createJournalRequest- (required)idempotencyKey- Unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal instead of creating a new one. Use a client-generated value (e.g. UUID) per logical journal. Strongly recommended for production to prevent duplicate journals on retries. (optional)- Returns:
- Journal
- 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 New Journal object - 400 One of the parameters is invalid. - 403 The amount requested to move is not available. - 404 One of the account is not found. - 422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
-
createJournalWithHttpInfo
public ApiResponse<Journal> createJournalWithHttpInfo(@Nonnull CreateJournalRequest createJournalRequest, @Nullable String idempotencyKey) throws ApiException Create a Journal A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`. Generally, journal requests are subject to approval and starts from the `pending` status. The status changes are propagated through the Event API. Under certain conditions agreed for the partner, such journal transactions that meet the criteria are executed right away. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one journal. A subsequent request returns the previously created journal with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journals. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate journals. Use a client-generated unique value (e.g. UUID).- Parameters:
createJournalRequest- (required)idempotencyKey- Unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal instead of creating a new one. Use a client-generated value (e.g. UUID) per logical journal. Strongly recommended for production to prevent duplicate journals on retries. (optional)- Returns:
- ApiResponse<Journal>
- 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 New Journal object - 400 One of the parameters is invalid. - 403 The amount requested to move is not available. - 404 One of the account is not found. - 422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
-
createJournalAsync
public okhttp3.Call createJournalAsync(@Nonnull CreateJournalRequest createJournalRequest, @Nullable String idempotencyKey, ApiCallback<Journal> _callback) throws ApiException Create a Journal (asynchronously) A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`. Generally, journal requests are subject to approval and starts from the `pending` status. The status changes are propagated through the Event API. Under certain conditions agreed for the partner, such journal transactions that meet the criteria are executed right away. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one journal. A subsequent request returns the previously created journal with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journals. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate journals. Use a client-generated unique value (e.g. UUID).- Parameters:
createJournalRequest- (required)idempotencyKey- Unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal instead of creating a new one. Use a client-generated value (e.g. UUID) per logical journal. Strongly recommended for production to prevent duplicate journals on retries. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- HTTP Response Details:
Response Details Status Code Description Response Headers 200 The New Journal object - 400 One of the parameters is invalid. - 403 The amount requested to move is not available. - 404 One of the account is not found. - 422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
-
deleteJournalByIdCall
public okhttp3.Call deleteJournalByIdCall(@Nonnull UUID journalId, ApiCallback _callback) throws ApiException Build call for deleteJournalById- Parameters:
journalId- (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 The cancel request succeeded. (No-content) - 404 The journal is not found. - 422 The journal is not in the pending status. -
-
deleteJournalById
Cancel a Pending Journal You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete. The alternative is to create a mirror journal entry to reverse the flow of funds.- Parameters:
journalId- (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 The cancel request succeeded. (No-content) - 404 The journal is not found. - 422 The journal is not in the pending status. -
-
deleteJournalByIdWithHttpInfo
Cancel a Pending Journal You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete. The alternative is to create a mirror journal entry to reverse the flow of funds.- Parameters:
journalId- (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 The cancel request succeeded. (No-content) - 404 The journal is not found. - 422 The journal is not in the pending status. -
-
deleteJournalByIdAsync
public okhttp3.Call deleteJournalByIdAsync(@Nonnull UUID journalId, ApiCallback<Void> _callback) throws ApiException Cancel a Pending Journal (asynchronously) You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete. The alternative is to create a mirror journal entry to reverse the flow of funds.- Parameters:
journalId- (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 The cancel request succeeded. (No-content) - 404 The journal is not found. - 422 The journal is not in the pending status. -
-
getAllJournalsCall
public okhttp3.Call getAllJournalsCall(@Nullable LocalDate after, @Nullable LocalDate before, @Nullable JournalStatus status, @Nullable String entryType, @Nullable UUID toAccount, @Nullable UUID fromAccount, @Nullable Integer limit, ApiCallback _callback) throws ApiException Build call for getAllJournals- Parameters:
after- By journal creation date. Format: 2020-01-01 (optional)before- By journal creation date. Format: 2020-01-01 (optional)status- See the JournalStatus model for more info (optional)entryType- JNLC or JNLS (optional)toAccount- The account id that received the journal (optional)fromAccount- The account id that initiated the journal (optional)limit- The maximum number of results to return (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 - 400 One of the parameters is invalid. - 422 Result set exceeds 100,000 records. -
-
getAllJournals
public List<Journal> getAllJournals(@Nullable LocalDate after, @Nullable LocalDate before, @Nullable JournalStatus status, @Nullable String entryType, @Nullable UUID toAccount, @Nullable UUID fromAccount, @Nullable Integer limit) throws ApiException Retrieve a List Journals Returns an array of journal objects.- Parameters:
after- By journal creation date. Format: 2020-01-01 (optional)before- By journal creation date. Format: 2020-01-01 (optional)status- See the JournalStatus model for more info (optional)entryType- JNLC or JNLS (optional)toAccount- The account id that received the journal (optional)fromAccount- The account id that initiated the journal (optional)limit- The maximum number of results to return (optional)- Returns:
- List<Journal>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK - 400 One of the parameters is invalid. - 422 Result set exceeds 100,000 records. -
-
getAllJournalsWithHttpInfo
public ApiResponse<List<Journal>> getAllJournalsWithHttpInfo(@Nullable LocalDate after, @Nullable LocalDate before, @Nullable JournalStatus status, @Nullable String entryType, @Nullable UUID toAccount, @Nullable UUID fromAccount, @Nullable Integer limit) throws ApiException Retrieve a List Journals Returns an array of journal objects.- Parameters:
after- By journal creation date. Format: 2020-01-01 (optional)before- By journal creation date. Format: 2020-01-01 (optional)status- See the JournalStatus model for more info (optional)entryType- JNLC or JNLS (optional)toAccount- The account id that received the journal (optional)fromAccount- The account id that initiated the journal (optional)limit- The maximum number of results to return (optional)- Returns:
- ApiResponse<List<Journal>>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK - 400 One of the parameters is invalid. - 422 Result set exceeds 100,000 records. -
-
getAllJournalsAsync
public okhttp3.Call getAllJournalsAsync(@Nullable LocalDate after, @Nullable LocalDate before, @Nullable JournalStatus status, @Nullable String entryType, @Nullable UUID toAccount, @Nullable UUID fromAccount, @Nullable Integer limit, ApiCallback<List<Journal>> _callback) throws ApiException Retrieve a List Journals (asynchronously) Returns an array of journal objects.- Parameters:
after- By journal creation date. Format: 2020-01-01 (optional)before- By journal creation date. Format: 2020-01-01 (optional)status- See the JournalStatus model for more info (optional)entryType- JNLC or JNLS (optional)toAccount- The account id that received the journal (optional)fromAccount- The account id that initiated the journal (optional)limit- The maximum number of results to return (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 - 400 One of the parameters is invalid. - 422 Result set exceeds 100,000 records. -
-
getV1JournalsJournalIdCall
public okhttp3.Call getV1JournalsJournalIdCall(@Nonnull UUID journalId, ApiCallback _callback) throws ApiException Build call for getV1JournalsJournalId- Parameters:
journalId- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK -
-
getV1JournalsJournalId
Retrieve a Single Journal Entry You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id. Will return a journal entry if a journal entry with journal_id exists, otherwise will throw an error.- Parameters:
journalId- (required)- Returns:
- Journal
- 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 -
-
getV1JournalsJournalIdWithHttpInfo
public ApiResponse<Journal> getV1JournalsJournalIdWithHttpInfo(@Nonnull UUID journalId) throws ApiException Retrieve a Single Journal Entry You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id. Will return a journal entry if a journal entry with journal_id exists, otherwise will throw an error.- Parameters:
journalId- (required)- Returns:
- ApiResponse<Journal>
- 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 -
-
getV1JournalsJournalIdAsync
public okhttp3.Call getV1JournalsJournalIdAsync(@Nonnull UUID journalId, ApiCallback<Journal> _callback) throws ApiException Retrieve a Single Journal Entry (asynchronously) You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id. Will return a journal entry if a journal entry with journal_id exists, otherwise will throw an error.- Parameters:
journalId- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK -
-
postV1JournalsReverseBatchCall
public okhttp3.Call postV1JournalsReverseBatchCall(@Nullable ReverseBatchJournalRequest reverseBatchJournalRequest, ApiCallback _callback) throws ApiException Build call for postV1JournalsReverseBatch- Parameters:
reverseBatchJournalRequest- (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 - 400 Invalid Request Body - 403 Insufficient Balance (JNLC) or Insufficient Assets (JNLS) - 404 Account not found -
-
postV1JournalsReverseBatch
public List<BatchJournalResponse> postV1JournalsReverseBatch(@Nullable ReverseBatchJournalRequest reverseBatchJournalRequest) throws ApiException Create a Reverse Batch Journal Transaction (Many-to-One) You can also create a batch journal request by using the following endpoint. This is enabled on JNLC for now only. Note that if there is an invalid account_id the whole batch operation will be canceled. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to submit a journal.- Parameters:
reverseBatchJournalRequest- (optional)- Returns:
- List<BatchJournalResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK - 400 Invalid Request Body - 403 Insufficient Balance (JNLC) or Insufficient Assets (JNLS) - 404 Account not found -
-
postV1JournalsReverseBatchWithHttpInfo
public ApiResponse<List<BatchJournalResponse>> postV1JournalsReverseBatchWithHttpInfo(@Nullable ReverseBatchJournalRequest reverseBatchJournalRequest) throws ApiException Create a Reverse Batch Journal Transaction (Many-to-One) You can also create a batch journal request by using the following endpoint. This is enabled on JNLC for now only. Note that if there is an invalid account_id the whole batch operation will be canceled. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to submit a journal.- Parameters:
reverseBatchJournalRequest- (optional)- Returns:
- ApiResponse<List<BatchJournalResponse>>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK - 400 Invalid Request Body - 403 Insufficient Balance (JNLC) or Insufficient Assets (JNLS) - 404 Account not found -
-
postV1JournalsReverseBatchAsync
public okhttp3.Call postV1JournalsReverseBatchAsync(@Nullable ReverseBatchJournalRequest reverseBatchJournalRequest, ApiCallback<List<BatchJournalResponse>> _callback) throws ApiException Create a Reverse Batch Journal Transaction (Many-to-One) (asynchronously) You can also create a batch journal request by using the following endpoint. This is enabled on JNLC for now only. Note that if there is an invalid account_id the whole batch operation will be canceled. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to submit a journal.- Parameters:
reverseBatchJournalRequest- (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 - 400 Invalid Request Body - 403 Insufficient Balance (JNLC) or Insufficient Assets (JNLS) - 404 Account not found -
-