Class LocatesApi
java.lang.Object
markets.alpaca.client.openapi.trading.api.LocatesApi
Generated client for LocatesApi 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
createLocates: Create LocategetLocate: Get LocatelistLocateQuotes: Get Locate QuoteslistLocates: List Locates
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateLocates(CreateLocateRequest createLocateRequest) Create Locate Creates a locate request for a short sale.okhttp3.CallcreateLocatesAsync(CreateLocateRequest createLocateRequest, ApiCallback<Locate> _callback) Create Locate (asynchronously) Creates a locate request for a short sale.okhttp3.CallcreateLocatesCall(CreateLocateRequest createLocateRequest, ApiCallback _callback) Build call for createLocatescreateLocatesWithHttpInfo(CreateLocateRequest createLocateRequest) Create Locate Creates a locate request for a short sale.intGet Locate Returns a locate by ID.okhttp3.CallgetLocateAsync(UUID locateId, ApiCallback<Locate> _callback) Get Locate (asynchronously) Returns a locate by ID.okhttp3.CallgetLocateCall(UUID locateId, ApiCallback _callback) Build call for getLocategetLocateWithHttpInfo(UUID locateId) Get Locate Returns a locate by ID.listLocateQuotes(String symbols) Get Locate Quotes Returns locate availability and pricing for one or more symbols.okhttp3.CalllistLocateQuotesAsync(String symbols, ApiCallback<ListLocateQuotesResponse> _callback) Get Locate Quotes (asynchronously) Returns locate availability and pricing for one or more symbols.okhttp3.CalllistLocateQuotesCall(String symbols, ApiCallback _callback) Build call for listLocateQuoteslistLocateQuotesWithHttpInfo(String symbols) Get Locate Quotes Returns locate availability and pricing for one or more symbols.listLocates(String pageToken, Integer limit, LocateStatus status, String symbol, LocalDate start, LocalDate end) List Locates Returns locates filtered by status, symbol, or date range.okhttp3.CalllistLocatesAsync(String pageToken, Integer limit, LocateStatus status, String symbol, LocalDate start, LocalDate end, ApiCallback<ListLocatesResponse> _callback) List Locates (asynchronously) Returns locates filtered by status, symbol, or date range.okhttp3.CalllistLocatesCall(String pageToken, Integer limit, LocateStatus status, String symbol, LocalDate start, LocalDate end, ApiCallback _callback) Build call for listLocateslistLocatesWithHttpInfo(String pageToken, Integer limit, LocateStatus status, String symbol, LocalDate start, LocalDate end) List Locates Returns locates filtered by status, symbol, or date range.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex)
-
Constructor Details
-
LocatesApi
public LocatesApi() -
LocatesApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
createLocatesCall
public okhttp3.Call createLocatesCall(@Nonnull CreateLocateRequest createLocateRequest, ApiCallback _callback) throws ApiException Build call for createLocates- Parameters:
createLocateRequest- Locate request details. (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 Created - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 422 Cannot complete locate request. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
createLocates
Create Locate Creates a locate request for a short sale.- Parameters:
createLocateRequest- Locate request details. (required)- Returns:
- Locate
- 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 Created - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 422 Cannot complete locate request. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
createLocatesWithHttpInfo
public ApiResponse<Locate> createLocatesWithHttpInfo(@Nonnull CreateLocateRequest createLocateRequest) throws ApiException Create Locate Creates a locate request for a short sale.- Parameters:
createLocateRequest- Locate request details. (required)- Returns:
- ApiResponse<Locate>
- 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 Created - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 422 Cannot complete locate request. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
createLocatesAsync
public okhttp3.Call createLocatesAsync(@Nonnull CreateLocateRequest createLocateRequest, ApiCallback<Locate> _callback) throws ApiException Create Locate (asynchronously) Creates a locate request for a short sale.- Parameters:
createLocateRequest- Locate request details. (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 Created - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 422 Cannot complete locate request. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
getLocateCall
public okhttp3.Call getLocateCall(@Nonnull UUID locateId, ApiCallback _callback) throws ApiException Build call for getLocate- Parameters:
locateId- The locate ID. (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 requested locate. - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 404 Not found - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
getLocate
Get Locate Returns a locate by ID.- Parameters:
locateId- The locate ID. (required)- Returns:
- Locate
- 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 requested locate. - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 404 Not found - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
getLocateWithHttpInfo
Get Locate Returns a locate by ID.- Parameters:
locateId- The locate ID. (required)- Returns:
- ApiResponse<Locate>
- 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 requested locate. - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 404 Not found - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
getLocateAsync
public okhttp3.Call getLocateAsync(@Nonnull UUID locateId, ApiCallback<Locate> _callback) throws ApiException Get Locate (asynchronously) Returns a locate by ID.- Parameters:
locateId- The locate ID. (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 requested locate. - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 404 Not found - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
listLocateQuotesCall
public okhttp3.Call listLocateQuotesCall(@Nonnull String symbols, ApiCallback _callback) throws ApiException Build call for listLocateQuotes- Parameters:
symbols- Comma-separated list of stock symbols. Maximum 100 unique symbols. (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 locate quotes for the requested symbols. - 400 Invalid locate quote request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
listLocateQuotes
Get Locate Quotes Returns locate availability and pricing for one or more symbols.- Parameters:
symbols- Comma-separated list of stock symbols. Maximum 100 unique symbols. (required)- Returns:
- ListLocateQuotesResponse
- 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 locate quotes for the requested symbols. - 400 Invalid locate quote request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
listLocateQuotesWithHttpInfo
public ApiResponse<ListLocateQuotesResponse> listLocateQuotesWithHttpInfo(@Nonnull String symbols) throws ApiException Get Locate Quotes Returns locate availability and pricing for one or more symbols.- Parameters:
symbols- Comma-separated list of stock symbols. Maximum 100 unique symbols. (required)- Returns:
- ApiResponse<ListLocateQuotesResponse>
- 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 locate quotes for the requested symbols. - 400 Invalid locate quote request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
listLocateQuotesAsync
public okhttp3.Call listLocateQuotesAsync(@Nonnull String symbols, ApiCallback<ListLocateQuotesResponse> _callback) throws ApiException Get Locate Quotes (asynchronously) Returns locate availability and pricing for one or more symbols.- Parameters:
symbols- Comma-separated list of stock symbols. Maximum 100 unique symbols. (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 locate quotes for the requested symbols. - 400 Invalid locate quote request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
listLocatesCall
public okhttp3.Call listLocatesCall(@Nullable String pageToken, @Nullable Integer limit, @Nullable LocateStatus status, @Nullable String symbol, @Nullable LocalDate start, @Nullable LocalDate end, ApiCallback _callback) throws ApiException Build call for listLocates- Parameters:
pageToken- Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)limit- Maximum number of results to return. (optional, default to 1000)status- Filter by locate status. (optional)symbol- Filter by stock symbol. (optional)start- Filter locates with locate trading date on or after this date. Format: YYYY-MM-DD. The locate trading date uses America/New_York and rolls at 8pm ET. (optional)end- Filter locates with locate trading date before this date (exclusive). Format: YYYY-MM-DD. The locate trading date uses America/New_York and rolls at 8pm ET. (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 Returns a list of locates for the account, or an empty list if no locates are found. - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
listLocates
public ListLocatesResponse listLocates(@Nullable String pageToken, @Nullable Integer limit, @Nullable LocateStatus status, @Nullable String symbol, @Nullable LocalDate start, @Nullable LocalDate end) throws ApiException List Locates Returns locates filtered by status, symbol, or date range. Results are sorted by `created_at` descending, with `id` descending as the tie-breaker.- Parameters:
pageToken- Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)limit- Maximum number of results to return. (optional, default to 1000)status- Filter by locate status. (optional)symbol- Filter by stock symbol. (optional)start- Filter locates with locate trading date on or after this date. Format: YYYY-MM-DD. The locate trading date uses America/New_York and rolls at 8pm ET. (optional)end- Filter locates with locate trading date before this date (exclusive). Format: YYYY-MM-DD. The locate trading date uses America/New_York and rolls at 8pm ET. (optional)- Returns:
- ListLocatesResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- HTTP Response Details:
Response Details Status Code Description Response Headers 200 Returns a list of locates for the account, or an empty list if no locates are found. - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
listLocatesWithHttpInfo
public ApiResponse<ListLocatesResponse> listLocatesWithHttpInfo(@Nullable String pageToken, @Nullable Integer limit, @Nullable LocateStatus status, @Nullable String symbol, @Nullable LocalDate start, @Nullable LocalDate end) throws ApiException List Locates Returns locates filtered by status, symbol, or date range. Results are sorted by `created_at` descending, with `id` descending as the tie-breaker.- Parameters:
pageToken- Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)limit- Maximum number of results to return. (optional, default to 1000)status- Filter by locate status. (optional)symbol- Filter by stock symbol. (optional)start- Filter locates with locate trading date on or after this date. Format: YYYY-MM-DD. The locate trading date uses America/New_York and rolls at 8pm ET. (optional)end- Filter locates with locate trading date before this date (exclusive). Format: YYYY-MM-DD. The locate trading date uses America/New_York and rolls at 8pm ET. (optional)- Returns:
- ApiResponse<ListLocatesResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- HTTP Response Details:
Response Details Status Code Description Response Headers 200 Returns a list of locates for the account, or an empty list if no locates are found. - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
listLocatesAsync
public okhttp3.Call listLocatesAsync(@Nullable String pageToken, @Nullable Integer limit, @Nullable LocateStatus status, @Nullable String symbol, @Nullable LocalDate start, @Nullable LocalDate end, ApiCallback<ListLocatesResponse> _callback) throws ApiException List Locates (asynchronously) Returns locates filtered by status, symbol, or date range. Results are sorted by `created_at` descending, with `id` descending as the tie-breaker.- Parameters:
pageToken- Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)limit- Maximum number of results to return. (optional, default to 1000)status- Filter by locate status. (optional)symbol- Filter by stock symbol. (optional)start- Filter locates with locate trading date on or after this date. Format: YYYY-MM-DD. The locate trading date uses America/New_York and rolls at 8pm ET. (optional)end- Filter locates with locate trading date before this date (exclusive). Format: YYYY-MM-DD. The locate trading date uses America/New_York and rolls at 8pm ET. (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 Returns a list of locates for the account, or an empty list if no locates are found. - 400 Invalid locate request. - 401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 User has no access to a resource. - 500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-