Package markets.alpaca.client.data
Class AlpacaStocks
java.lang.Object
markets.alpaca.client.data.AlpacaStocks
Handwritten convenience facade for common Market Data stock workflows.
This class wraps the generated Market Data StockApi and exposes typed request objects
for common operations. Use generatedApi() when an endpoint is not covered by this
facade.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAlpacaStocks(StockApi generatedApi) Creates a facade around a generated Market DataStockApi.AlpacaStocks(ApiClient dataClient) Creates a facade from a generated Market DataApiClient. -
Method Summary
Modifier and TypeMethodDescriptionReturns the generated API for operations not covered by this facade.trades(StockTradesRequest request) Returns historical stock trades for one or more symbols.tradesForSymbol(StockTradesRequest request) Returns historical stock trades through the single-symbol endpoint.Returns single-symbol historical stock trades with HTTP status code and response headers.tradesWithHttpInfo(StockTradesRequest request) Returns historical stock trades with HTTP status code and response headers.
-
Constructor Details
-
AlpacaStocks
Creates a facade around a generated Market DataStockApi. -
AlpacaStocks
Creates a facade from a generated Market DataApiClient.
-
-
Method Details
-
generatedApi
Returns the generated API for operations not covered by this facade. -
trades
Returns historical stock trades for one or more symbols.Use
StockTradesRequest.builder()to set symbols, time range, feed, currency, pagination token, and sort order without depending on generated parameter ordering.- Throws:
ApiException
-
tradesWithHttpInfo
public ApiResponse<StockTradesResp> tradesWithHttpInfo(StockTradesRequest request) throws ApiException Returns historical stock trades with HTTP status code and response headers.Use this overload for pagination and rate-limit headers.
- Throws:
ApiException
-
tradesForSymbol
Returns historical stock trades through the single-symbol endpoint.The request must contain exactly one symbol. The single-symbol response model differs from the multi-symbol response model generated from the OpenAPI spec.
- Throws:
ApiException
-
tradesForSymbolWithHttpInfo
public ApiResponse<StockTradesRespSingle> tradesForSymbolWithHttpInfo(StockTradesRequest request) throws ApiException Returns single-symbol historical stock trades with HTTP status code and response headers.- Throws:
ApiException
-