Class CryptoApi
java.lang.Object
markets.alpaca.client.openapi.data.api.CryptoApi
Generated client for CryptoApi 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
cryptoBars: Historical barscryptoLatestBars: Latest barscryptoLatestOrderbooks: Latest orderbookcryptoLatestQuotes: Latest quotescryptoLatestTrades: Latest tradescryptoQuotes: Historical quotescryptoSnapshots: SnapshotscryptoTrades: Historical trades
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncryptoBars(CryptoHistoricalLoc loc, String symbols, String timeframe, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort) Historical bars The crypto bars API provides historical aggregates for a list of crypto symbols between the specified dates.okhttp3.CallcryptoBarsAsync(CryptoHistoricalLoc loc, String symbols, String timeframe, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort, ApiCallback<CryptoBarsResp> _callback) Historical bars (asynchronously) The crypto bars API provides historical aggregates for a list of crypto symbols between the specified dates.okhttp3.CallcryptoBarsCall(CryptoHistoricalLoc loc, String symbols, String timeframe, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort, ApiCallback _callback) Build call for cryptoBarscryptoBarsWithHttpInfo(CryptoHistoricalLoc loc, String symbols, String timeframe, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort) Historical bars The crypto bars API provides historical aggregates for a list of crypto symbols between the specified dates.cryptoLatestBars(CryptoLatestLoc loc, String symbols) Latest bars The latest multi-bars endpoint returns the latest minute-aggregated historical bar data for each of the crypto symbols provided.okhttp3.CallcryptoLatestBarsAsync(CryptoLatestLoc loc, String symbols, ApiCallback<CryptoLatestBarsResp> _callback) Latest bars (asynchronously) The latest multi-bars endpoint returns the latest minute-aggregated historical bar data for each of the crypto symbols provided.okhttp3.CallcryptoLatestBarsCall(CryptoLatestLoc loc, String symbols, ApiCallback _callback) Build call for cryptoLatestBarscryptoLatestBarsWithHttpInfo(CryptoLatestLoc loc, String symbols) Latest bars The latest multi-bars endpoint returns the latest minute-aggregated historical bar data for each of the crypto symbols provided.cryptoLatestOrderbooks(CryptoLatestLoc loc, String symbols) Latest orderbook The latest orderbook endpoint returns the latest bid and ask orderbook for the crypto symbols provided.okhttp3.CallcryptoLatestOrderbooksAsync(CryptoLatestLoc loc, String symbols, ApiCallback<CryptoLatestOrderbooksResp> _callback) Latest orderbook (asynchronously) The latest orderbook endpoint returns the latest bid and ask orderbook for the crypto symbols provided.okhttp3.CallcryptoLatestOrderbooksCall(CryptoLatestLoc loc, String symbols, ApiCallback _callback) Build call for cryptoLatestOrderbookscryptoLatestOrderbooksWithHttpInfo(CryptoLatestLoc loc, String symbols) Latest orderbook The latest orderbook endpoint returns the latest bid and ask orderbook for the crypto symbols provided.cryptoLatestQuotes(CryptoLatestLoc loc, String symbols) Latest quotes The latest quotes endpoint returns the latest bid and ask prices for the crypto symbols provided.okhttp3.CallcryptoLatestQuotesAsync(CryptoLatestLoc loc, String symbols, ApiCallback<CryptoLatestQuotesResp> _callback) Latest quotes (asynchronously) The latest quotes endpoint returns the latest bid and ask prices for the crypto symbols provided.okhttp3.CallcryptoLatestQuotesCall(CryptoLatestLoc loc, String symbols, ApiCallback _callback) Build call for cryptoLatestQuotescryptoLatestQuotesWithHttpInfo(CryptoLatestLoc loc, String symbols) Latest quotes The latest quotes endpoint returns the latest bid and ask prices for the crypto symbols provided.cryptoLatestTrades(CryptoLatestLoc loc, String symbols) Latest trades The latest trades endpoint returns the latest trade data for the crypto symbols provided.okhttp3.CallcryptoLatestTradesAsync(CryptoLatestLoc loc, String symbols, ApiCallback<CryptoLatestTradesResp> _callback) Latest trades (asynchronously) The latest trades endpoint returns the latest trade data for the crypto symbols provided.okhttp3.CallcryptoLatestTradesCall(CryptoLatestLoc loc, String symbols, ApiCallback _callback) Build call for cryptoLatestTradescryptoLatestTradesWithHttpInfo(CryptoLatestLoc loc, String symbols) Latest trades The latest trades endpoint returns the latest trade data for the crypto symbols provided.cryptoQuotes(CryptoHistoricalLoc loc, String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort) Historical quotes The crypto quotes API provides historical quote data for a list of crypto symbols between the specified dates.okhttp3.CallcryptoQuotesAsync(CryptoHistoricalLoc loc, String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort, ApiCallback<CryptoQuotesResp> _callback) Historical quotes (asynchronously) The crypto quotes API provides historical quote data for a list of crypto symbols between the specified dates.okhttp3.CallcryptoQuotesCall(CryptoHistoricalLoc loc, String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort, ApiCallback _callback) Build call for cryptoQuotescryptoQuotesWithHttpInfo(CryptoHistoricalLoc loc, String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort) Historical quotes The crypto quotes API provides historical quote data for a list of crypto symbols between the specified dates.cryptoSnapshots(CryptoLatestLoc loc, String symbols) Snapshots The snapshots endpoint returns the latest trade, latest quote, latest minute bar, latest daily bar, and previous daily bar data for crypto symbols.okhttp3.CallcryptoSnapshotsAsync(CryptoLatestLoc loc, String symbols, ApiCallback<CryptoSnapshotsResp> _callback) Snapshots (asynchronously) The snapshots endpoint returns the latest trade, latest quote, latest minute bar, latest daily bar, and previous daily bar data for crypto symbols.okhttp3.CallcryptoSnapshotsCall(CryptoLatestLoc loc, String symbols, ApiCallback _callback) Build call for cryptoSnapshotscryptoSnapshotsWithHttpInfo(CryptoLatestLoc loc, String symbols) Snapshots The snapshots endpoint returns the latest trade, latest quote, latest minute bar, latest daily bar, and previous daily bar data for crypto symbols.cryptoTrades(CryptoHistoricalLoc loc, String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort) Historical trades The crypto trades API provides historical trade data for a list of crypto symbols between the specified dates.okhttp3.CallcryptoTradesAsync(CryptoHistoricalLoc loc, String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort, ApiCallback<CryptoTradesResp> _callback) Historical trades (asynchronously) The crypto trades API provides historical trade data for a list of crypto symbols between the specified dates.okhttp3.CallcryptoTradesCall(CryptoHistoricalLoc loc, String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort, ApiCallback _callback) Build call for cryptoTradescryptoTradesWithHttpInfo(CryptoHistoricalLoc loc, String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort) Historical trades The crypto trades API provides historical trade data for a list of crypto symbols between the specified dates.intvoidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex)
-
Constructor Details
-
CryptoApi
public CryptoApi() -
CryptoApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
cryptoBarsCall
public okhttp3.Call cryptoBarsCall(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nonnull String timeframe, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort, ApiCallback _callback) throws ApiException Build call for cryptoBars- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)timeframe- The timeframe represented by each bar in aggregation. You can use any of the following values: - `[1-59]Min` or `[1-59]T`, e.g. `5Min` or `5T` creates 5-minute aggregations - `[1-23]Hour` or `[1-23]H`, e.g. `12Hour` or `12H` creates 12-hour aggregations - `1Day` or `1D` creates 1-day aggregations - `1Week` or `1W` creates 1-week aggregations - `[1,2,3,4,6,12]Month` or `[1,2,3,4,6,12]M`, e.g. `3Month` or `3M` creates 3-month aggregations (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)_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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoBars
public CryptoBarsResp cryptoBars(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nonnull String timeframe, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort) throws ApiException Historical bars The crypto bars API provides historical aggregates for a list of crypto symbols between the specified dates.- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)timeframe- The timeframe represented by each bar in aggregation. You can use any of the following values: - `[1-59]Min` or `[1-59]T`, e.g. `5Min` or `5T` creates 5-minute aggregations - `[1-23]Hour` or `[1-23]H`, e.g. `12Hour` or `12H` creates 12-hour aggregations - `1Day` or `1D` creates 1-day aggregations - `1Week` or `1W` creates 1-week aggregations - `[1,2,3,4,6,12]Month` or `[1,2,3,4,6,12]M`, e.g. `3Month` or `3M` creates 3-month aggregations (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)- Returns:
- CryptoBarsResp
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoBarsWithHttpInfo
public ApiResponse<CryptoBarsResp> cryptoBarsWithHttpInfo(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nonnull String timeframe, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort) throws ApiException Historical bars The crypto bars API provides historical aggregates for a list of crypto symbols between the specified dates.- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)timeframe- The timeframe represented by each bar in aggregation. You can use any of the following values: - `[1-59]Min` or `[1-59]T`, e.g. `5Min` or `5T` creates 5-minute aggregations - `[1-23]Hour` or `[1-23]H`, e.g. `12Hour` or `12H` creates 12-hour aggregations - `1Day` or `1D` creates 1-day aggregations - `1Week` or `1W` creates 1-week aggregations - `[1,2,3,4,6,12]Month` or `[1,2,3,4,6,12]M`, e.g. `3Month` or `3M` creates 3-month aggregations (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)- Returns:
- ApiResponse<CryptoBarsResp>
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoBarsAsync
public okhttp3.Call cryptoBarsAsync(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nonnull String timeframe, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort, ApiCallback<CryptoBarsResp> _callback) throws ApiException Historical bars (asynchronously) The crypto bars API provides historical aggregates for a list of crypto symbols between the specified dates.- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)timeframe- The timeframe represented by each bar in aggregation. You can use any of the following values: - `[1-59]Min` or `[1-59]T`, e.g. `5Min` or `5T` creates 5-minute aggregations - `[1-23]Hour` or `[1-23]H`, e.g. `12Hour` or `12H` creates 12-hour aggregations - `1Day` or `1D` creates 1-day aggregations - `1Week` or `1W` creates 1-week aggregations - `[1,2,3,4,6,12]Month` or `[1,2,3,4,6,12]M`, e.g. `3Month` or `3M` creates 3-month aggregations (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)_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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestBarsCall
public okhttp3.Call cryptoLatestBarsCall(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols, ApiCallback _callback) throws ApiException Build call for cryptoLatestBars- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto 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 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestBars
public CryptoLatestBarsResp cryptoLatestBars(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols) throws ApiException Latest bars The latest multi-bars endpoint returns the latest minute-aggregated historical bar data for each of the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)- Returns:
- CryptoLatestBarsResp
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestBarsWithHttpInfo
public ApiResponse<CryptoLatestBarsResp> cryptoLatestBarsWithHttpInfo(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols) throws ApiException Latest bars The latest multi-bars endpoint returns the latest minute-aggregated historical bar data for each of the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)- Returns:
- ApiResponse<CryptoLatestBarsResp>
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestBarsAsync
public okhttp3.Call cryptoLatestBarsAsync(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols, ApiCallback<CryptoLatestBarsResp> _callback) throws ApiException Latest bars (asynchronously) The latest multi-bars endpoint returns the latest minute-aggregated historical bar data for each of the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto 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 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestOrderbooksCall
public okhttp3.Call cryptoLatestOrderbooksCall(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols, ApiCallback _callback) throws ApiException Build call for cryptoLatestOrderbooks- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto 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 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestOrderbooks
public CryptoLatestOrderbooksResp cryptoLatestOrderbooks(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols) throws ApiException Latest orderbook The latest orderbook endpoint returns the latest bid and ask orderbook for the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)- Returns:
- CryptoLatestOrderbooksResp
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestOrderbooksWithHttpInfo
public ApiResponse<CryptoLatestOrderbooksResp> cryptoLatestOrderbooksWithHttpInfo(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols) throws ApiException Latest orderbook The latest orderbook endpoint returns the latest bid and ask orderbook for the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)- Returns:
- ApiResponse<CryptoLatestOrderbooksResp>
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestOrderbooksAsync
public okhttp3.Call cryptoLatestOrderbooksAsync(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols, ApiCallback<CryptoLatestOrderbooksResp> _callback) throws ApiException Latest orderbook (asynchronously) The latest orderbook endpoint returns the latest bid and ask orderbook for the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto 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 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestQuotesCall
public okhttp3.Call cryptoLatestQuotesCall(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols, ApiCallback _callback) throws ApiException Build call for cryptoLatestQuotes- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto 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 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestQuotes
public CryptoLatestQuotesResp cryptoLatestQuotes(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols) throws ApiException Latest quotes The latest quotes endpoint returns the latest bid and ask prices for the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)- Returns:
- CryptoLatestQuotesResp
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestQuotesWithHttpInfo
public ApiResponse<CryptoLatestQuotesResp> cryptoLatestQuotesWithHttpInfo(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols) throws ApiException Latest quotes The latest quotes endpoint returns the latest bid and ask prices for the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)- Returns:
- ApiResponse<CryptoLatestQuotesResp>
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestQuotesAsync
public okhttp3.Call cryptoLatestQuotesAsync(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols, ApiCallback<CryptoLatestQuotesResp> _callback) throws ApiException Latest quotes (asynchronously) The latest quotes endpoint returns the latest bid and ask prices for the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto 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 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestTradesCall
public okhttp3.Call cryptoLatestTradesCall(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols, ApiCallback _callback) throws ApiException Build call for cryptoLatestTrades- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto 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 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestTrades
public CryptoLatestTradesResp cryptoLatestTrades(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols) throws ApiException Latest trades The latest trades endpoint returns the latest trade data for the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)- Returns:
- CryptoLatestTradesResp
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestTradesWithHttpInfo
public ApiResponse<CryptoLatestTradesResp> cryptoLatestTradesWithHttpInfo(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols) throws ApiException Latest trades The latest trades endpoint returns the latest trade data for the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)- Returns:
- ApiResponse<CryptoLatestTradesResp>
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoLatestTradesAsync
public okhttp3.Call cryptoLatestTradesAsync(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols, ApiCallback<CryptoLatestTradesResp> _callback) throws ApiException Latest trades (asynchronously) The latest trades endpoint returns the latest trade data for the crypto symbols provided.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto 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 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoQuotesCall
public okhttp3.Call cryptoQuotesCall(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort, ApiCallback _callback) throws ApiException Build call for cryptoQuotes- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)_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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoQuotes
public CryptoQuotesResp cryptoQuotes(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort) throws ApiException Historical quotes The crypto quotes API provides historical quote data for a list of crypto symbols between the specified dates. The oldest date to retrieve historical quotes of us-1 location is 14th October, 2025 12AM UTC.- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)- Returns:
- CryptoQuotesResp
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoQuotesWithHttpInfo
public ApiResponse<CryptoQuotesResp> cryptoQuotesWithHttpInfo(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort) throws ApiException Historical quotes The crypto quotes API provides historical quote data for a list of crypto symbols between the specified dates. The oldest date to retrieve historical quotes of us-1 location is 14th October, 2025 12AM UTC.- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)- Returns:
- ApiResponse<CryptoQuotesResp>
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoQuotesAsync
public okhttp3.Call cryptoQuotesAsync(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort, ApiCallback<CryptoQuotesResp> _callback) throws ApiException Historical quotes (asynchronously) The crypto quotes API provides historical quote data for a list of crypto symbols between the specified dates. The oldest date to retrieve historical quotes of us-1 location is 14th October, 2025 12AM UTC.- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)_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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoSnapshotsCall
public okhttp3.Call cryptoSnapshotsCall(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols, ApiCallback _callback) throws ApiException Build call for cryptoSnapshots- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto 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 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoSnapshots
public CryptoSnapshotsResp cryptoSnapshots(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols) throws ApiException Snapshots The snapshots endpoint returns the latest trade, latest quote, latest minute bar, latest daily bar, and previous daily bar data for crypto symbols.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)- Returns:
- CryptoSnapshotsResp
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoSnapshotsWithHttpInfo
public ApiResponse<CryptoSnapshotsResp> cryptoSnapshotsWithHttpInfo(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols) throws ApiException Snapshots The snapshots endpoint returns the latest trade, latest quote, latest minute bar, latest daily bar, and previous daily bar data for crypto symbols.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)- Returns:
- ApiResponse<CryptoSnapshotsResp>
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoSnapshotsAsync
public okhttp3.Call cryptoSnapshotsAsync(@Nonnull CryptoLatestLoc loc, @Nonnull String symbols, ApiCallback<CryptoSnapshotsResp> _callback) throws ApiException Snapshots (asynchronously) The snapshots endpoint returns the latest trade, latest quote, latest minute bar, latest daily bar, and previous daily bar data for crypto symbols.- Parameters:
loc- Crypto location from where the latest market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto 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 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoTradesCall
public okhttp3.Call cryptoTradesCall(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort, ApiCallback _callback) throws ApiException Build call for cryptoTrades- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)_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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoTrades
public CryptoTradesResp cryptoTrades(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort) throws ApiException Historical trades The crypto trades API provides historical trade data for a list of crypto symbols between the specified dates.- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)- Returns:
- CryptoTradesResp
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoTradesWithHttpInfo
public ApiResponse<CryptoTradesResp> cryptoTradesWithHttpInfo(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort) throws ApiException Historical trades The crypto trades API provides historical trade data for a list of crypto symbols between the specified dates.- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)- Returns:
- ApiResponse<CryptoTradesResp>
- 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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-
cryptoTradesAsync
public okhttp3.Call cryptoTradesAsync(@Nonnull CryptoHistoricalLoc loc, @Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort, ApiCallback<CryptoTradesResp> _callback) throws ApiException Historical trades (asynchronously) The crypto trades API provides historical trade data for a list of crypto symbols between the specified dates.- Parameters:
loc- Crypto location from where the historical market data is retrieved. - `us`: Alpaca US - `us-1`: Kraken US - `eu-1`: Kraken EU (required)symbols- A comma-separated list of crypto symbols. (required)start- The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed. (optional)end- The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time. (optional)limit- The maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol! (optional, default to 1000)pageToken- The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit. (optional)sort- Sort data in ascending or descending order. (optional, default to asc)_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 * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
401 Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key. - 403 The requested resource is forbidden. - 429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/). -
-