Class OptionApi
java.lang.Object
markets.alpaca.client.openapi.data.api.OptionApi
Generated client for OptionApi 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
optionBars: Historical barsoptionChain: Option chainoptionLatestQuotes: Latest quotesoptionLatestTrades: Latest tradesoptionMetaConditions: Condition codesoptionMetaExchanges: Exchange codesoptionSnapshots: SnapshotsoptionTrades: Historical trades
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintoptionBars(String symbols, String timeframe, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort) Historical bars The historical option bars API provides aggregates for a list of option symbols between the specified dates.okhttp3.CalloptionBarsAsync(String symbols, String timeframe, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort, ApiCallback<OptionBarsResp> _callback) Historical bars (asynchronously) The historical option bars API provides aggregates for a list of option symbols between the specified dates.okhttp3.CalloptionBarsCall(String symbols, String timeframe, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort, ApiCallback _callback) Build call for optionBarsoptionBarsWithHttpInfo(String symbols, String timeframe, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort) Historical bars The historical option bars API provides aggregates for a list of option symbols between the specified dates.optionChain(String underlyingSymbol, OptionFeed feed, Integer limit, OffsetDateTime updatedSince, String pageToken, String type, Double strikePriceGte, Double strikePriceLte, LocalDate expirationDate, LocalDate expirationDateGte, LocalDate expirationDateLte, String rootSymbol) Option chain The option chain endpoint provides the latest trade, latest quote, and greeks for each contract symbol of the underlying symbol.okhttp3.CalloptionChainAsync(String underlyingSymbol, OptionFeed feed, Integer limit, OffsetDateTime updatedSince, String pageToken, String type, Double strikePriceGte, Double strikePriceLte, LocalDate expirationDate, LocalDate expirationDateGte, LocalDate expirationDateLte, String rootSymbol, ApiCallback<OptionSnapshotsResp> _callback) Option chain (asynchronously) The option chain endpoint provides the latest trade, latest quote, and greeks for each contract symbol of the underlying symbol.okhttp3.CalloptionChainCall(String underlyingSymbol, OptionFeed feed, Integer limit, OffsetDateTime updatedSince, String pageToken, String type, Double strikePriceGte, Double strikePriceLte, LocalDate expirationDate, LocalDate expirationDateGte, LocalDate expirationDateLte, String rootSymbol, ApiCallback _callback) Build call for optionChainoptionChainWithHttpInfo(String underlyingSymbol, OptionFeed feed, Integer limit, OffsetDateTime updatedSince, String pageToken, String type, Double strikePriceGte, Double strikePriceLte, LocalDate expirationDate, LocalDate expirationDateGte, LocalDate expirationDateLte, String rootSymbol) Option chain The option chain endpoint provides the latest trade, latest quote, and greeks for each contract symbol of the underlying symbol.optionLatestQuotes(String symbols, OptionFeed feed) Latest quotes The latest multi-quotes endpoint provides the latest bid and ask prices for each given contract symbol.okhttp3.CalloptionLatestQuotesAsync(String symbols, OptionFeed feed, ApiCallback<OptionLatestQuotesResp> _callback) Latest quotes (asynchronously) The latest multi-quotes endpoint provides the latest bid and ask prices for each given contract symbol.okhttp3.CalloptionLatestQuotesCall(String symbols, OptionFeed feed, ApiCallback _callback) Build call for optionLatestQuotesoptionLatestQuotesWithHttpInfo(String symbols, OptionFeed feed) Latest quotes The latest multi-quotes endpoint provides the latest bid and ask prices for each given contract symbol.optionLatestTrades(String symbols, OptionFeed feed) Latest trades The latest multi-trades endpoint provides the latest historical trade data for multiple given contract symbols.okhttp3.CalloptionLatestTradesAsync(String symbols, OptionFeed feed, ApiCallback<OptionLatestTradesResp> _callback) Latest trades (asynchronously) The latest multi-trades endpoint provides the latest historical trade data for multiple given contract symbols.okhttp3.CalloptionLatestTradesCall(String symbols, OptionFeed feed, ApiCallback _callback) Build call for optionLatestTradesoptionLatestTradesWithHttpInfo(String symbols, OptionFeed feed) Latest trades The latest multi-trades endpoint provides the latest historical trade data for multiple given contract symbols.optionMetaConditions(String ticktype) Condition codes Returns the mapping between the condition codes and names.okhttp3.CalloptionMetaConditionsAsync(String ticktype, ApiCallback<Map<String, String>> _callback) Condition codes (asynchronously) Returns the mapping between the condition codes and names.okhttp3.CalloptionMetaConditionsCall(String ticktype, ApiCallback _callback) Build call for optionMetaConditionsoptionMetaConditionsWithHttpInfo(String ticktype) Condition codes Returns the mapping between the condition codes and names.Exchange codes Returns the mapping between the option exchange codes and the corresponding exchange names.okhttp3.CalloptionMetaExchangesAsync(ApiCallback<Map<String, String>> _callback) Exchange codes (asynchronously) Returns the mapping between the option exchange codes and the corresponding exchange names.okhttp3.CalloptionMetaExchangesCall(ApiCallback _callback) Build call for optionMetaExchangesExchange codes Returns the mapping between the option exchange codes and the corresponding exchange names.optionSnapshots(String symbols, OptionFeed feed, OffsetDateTime updatedSince, Integer limit, String pageToken) Snapshots The snapshots endpoint provides the latest trade, latest quote and greeks for each given contract symbol.okhttp3.CalloptionSnapshotsAsync(String symbols, OptionFeed feed, OffsetDateTime updatedSince, Integer limit, String pageToken, ApiCallback<OptionSnapshotsResp> _callback) Snapshots (asynchronously) The snapshots endpoint provides the latest trade, latest quote and greeks for each given contract symbol.okhttp3.CalloptionSnapshotsCall(String symbols, OptionFeed feed, OffsetDateTime updatedSince, Integer limit, String pageToken, ApiCallback _callback) Build call for optionSnapshotsoptionSnapshotsWithHttpInfo(String symbols, OptionFeed feed, OffsetDateTime updatedSince, Integer limit, String pageToken) Snapshots The snapshots endpoint provides the latest trade, latest quote and greeks for each given contract symbol.optionTrades(String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort) Historical trades The historical option trades API provides trade data for a list of contract symbols between the specified dates.okhttp3.CalloptionTradesAsync(String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort, ApiCallback<OptionTradesResp> _callback) Historical trades (asynchronously) The historical option trades API provides trade data for a list of contract symbols between the specified dates.okhttp3.CalloptionTradesCall(String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort, ApiCallback _callback) Build call for optionTradesoptionTradesWithHttpInfo(String symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String pageToken, Sort sort) Historical trades The historical option trades API provides trade data for a list of contract symbols between the specified dates.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex)
-
Constructor Details
-
OptionApi
public OptionApi() -
OptionApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
optionBarsCall
public okhttp3.Call optionBarsCall(@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 optionBars- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (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/). -
-
optionBars
public OptionBarsResp optionBars(@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 historical option bars API provides aggregates for a list of option symbols between the specified dates. The returned results are sorted by symbol first, then by bar timestamp. This means that you are likely to see only one symbol in your first response if there are enough bars for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any bars were found for them.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (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:
- OptionBarsResp
- 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/). -
-
optionBarsWithHttpInfo
public ApiResponse<OptionBarsResp> optionBarsWithHttpInfo(@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 historical option bars API provides aggregates for a list of option symbols between the specified dates. The returned results are sorted by symbol first, then by bar timestamp. This means that you are likely to see only one symbol in your first response if there are enough bars for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any bars were found for them.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (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<OptionBarsResp>
- 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/). -
-
optionBarsAsync
public okhttp3.Call optionBarsAsync(@Nonnull String symbols, @Nonnull String timeframe, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort, ApiCallback<OptionBarsResp> _callback) throws ApiException Historical bars (asynchronously) The historical option bars API provides aggregates for a list of option symbols between the specified dates. The returned results are sorted by symbol first, then by bar timestamp. This means that you are likely to see only one symbol in your first response if there are enough bars for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any bars were found for them.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (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/). -
-
optionChainCall
public okhttp3.Call optionChainCall(@Nonnull String underlyingSymbol, @Nullable OptionFeed feed, @Nullable Integer limit, @Nullable OffsetDateTime updatedSince, @Nullable String pageToken, @Nullable String type, @Nullable Double strikePriceGte, @Nullable Double strikePriceLte, @Nullable LocalDate expirationDate, @Nullable LocalDate expirationDateGte, @Nullable LocalDate expirationDateLte, @Nullable String rootSymbol, ApiCallback _callback) throws ApiException Build call for optionChain- Parameters:
underlyingSymbol- The financial instrument on which an option contract is based or derived. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)limit- Number of maximum snapshots to return in a response. The limit applies to the total number of data points, not the number per symbol! Use `next_page_token` to fetch the next set of responses. (optional, default to 100)updatedSince- Filter to snapshots that were updated since this timestamp, meaning that the timestamp of the trade or the quote is greater than or equal to this value. Format: RFC-3339 or YYYY-MM-DD. If missing, all values are returned. (optional)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)type- Filter contracts by the type (call or put). (optional)strikePriceGte- Filter contracts with strike price greater than or equal to the specified value. (optional)strikePriceLte- Filter contracts with strike price less than or equal to the specified value. (optional)expirationDate- Filter contracts by the exact expiration date (format: YYYY-MM-DD). (optional)expirationDateGte- Filter contracts with expiration date greater than or equal to the specified date. (optional)expirationDateLte- Filter contracts with expiration date less than or equal to the specified date. (optional)rootSymbol- Filter contracts by the root symbol. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK * 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/). -
-
optionChain
public OptionSnapshotsResp optionChain(@Nonnull String underlyingSymbol, @Nullable OptionFeed feed, @Nullable Integer limit, @Nullable OffsetDateTime updatedSince, @Nullable String pageToken, @Nullable String type, @Nullable Double strikePriceGte, @Nullable Double strikePriceLte, @Nullable LocalDate expirationDate, @Nullable LocalDate expirationDateGte, @Nullable LocalDate expirationDateLte, @Nullable String rootSymbol) throws ApiException Option chain The option chain endpoint provides the latest trade, latest quote, and greeks for each contract symbol of the underlying symbol.- Parameters:
underlyingSymbol- The financial instrument on which an option contract is based or derived. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)limit- Number of maximum snapshots to return in a response. The limit applies to the total number of data points, not the number per symbol! Use `next_page_token` to fetch the next set of responses. (optional, default to 100)updatedSince- Filter to snapshots that were updated since this timestamp, meaning that the timestamp of the trade or the quote is greater than or equal to this value. Format: RFC-3339 or YYYY-MM-DD. If missing, all values are returned. (optional)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)type- Filter contracts by the type (call or put). (optional)strikePriceGte- Filter contracts with strike price greater than or equal to the specified value. (optional)strikePriceLte- Filter contracts with strike price less than or equal to the specified value. (optional)expirationDate- Filter contracts by the exact expiration date (format: YYYY-MM-DD). (optional)expirationDateGte- Filter contracts with expiration date greater than or equal to the specified date. (optional)expirationDateLte- Filter contracts with expiration date less than or equal to the specified date. (optional)rootSymbol- Filter contracts by the root symbol. (optional)- Returns:
- OptionSnapshotsResp
- 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/). -
-
optionChainWithHttpInfo
public ApiResponse<OptionSnapshotsResp> optionChainWithHttpInfo(@Nonnull String underlyingSymbol, @Nullable OptionFeed feed, @Nullable Integer limit, @Nullable OffsetDateTime updatedSince, @Nullable String pageToken, @Nullable String type, @Nullable Double strikePriceGte, @Nullable Double strikePriceLte, @Nullable LocalDate expirationDate, @Nullable LocalDate expirationDateGte, @Nullable LocalDate expirationDateLte, @Nullable String rootSymbol) throws ApiException Option chain The option chain endpoint provides the latest trade, latest quote, and greeks for each contract symbol of the underlying symbol.- Parameters:
underlyingSymbol- The financial instrument on which an option contract is based or derived. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)limit- Number of maximum snapshots to return in a response. The limit applies to the total number of data points, not the number per symbol! Use `next_page_token` to fetch the next set of responses. (optional, default to 100)updatedSince- Filter to snapshots that were updated since this timestamp, meaning that the timestamp of the trade or the quote is greater than or equal to this value. Format: RFC-3339 or YYYY-MM-DD. If missing, all values are returned. (optional)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)type- Filter contracts by the type (call or put). (optional)strikePriceGte- Filter contracts with strike price greater than or equal to the specified value. (optional)strikePriceLte- Filter contracts with strike price less than or equal to the specified value. (optional)expirationDate- Filter contracts by the exact expiration date (format: YYYY-MM-DD). (optional)expirationDateGte- Filter contracts with expiration date greater than or equal to the specified date. (optional)expirationDateLte- Filter contracts with expiration date less than or equal to the specified date. (optional)rootSymbol- Filter contracts by the root symbol. (optional)- Returns:
- ApiResponse<OptionSnapshotsResp>
- 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/). -
-
optionChainAsync
public okhttp3.Call optionChainAsync(@Nonnull String underlyingSymbol, @Nullable OptionFeed feed, @Nullable Integer limit, @Nullable OffsetDateTime updatedSince, @Nullable String pageToken, @Nullable String type, @Nullable Double strikePriceGte, @Nullable Double strikePriceLte, @Nullable LocalDate expirationDate, @Nullable LocalDate expirationDateGte, @Nullable LocalDate expirationDateLte, @Nullable String rootSymbol, ApiCallback<OptionSnapshotsResp> _callback) throws ApiException Option chain (asynchronously) The option chain endpoint provides the latest trade, latest quote, and greeks for each contract symbol of the underlying symbol.- Parameters:
underlyingSymbol- The financial instrument on which an option contract is based or derived. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)limit- Number of maximum snapshots to return in a response. The limit applies to the total number of data points, not the number per symbol! Use `next_page_token` to fetch the next set of responses. (optional, default to 100)updatedSince- Filter to snapshots that were updated since this timestamp, meaning that the timestamp of the trade or the quote is greater than or equal to this value. Format: RFC-3339 or YYYY-MM-DD. If missing, all values are returned. (optional)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)type- Filter contracts by the type (call or put). (optional)strikePriceGte- Filter contracts with strike price greater than or equal to the specified value. (optional)strikePriceLte- Filter contracts with strike price less than or equal to the specified value. (optional)expirationDate- Filter contracts by the exact expiration date (format: YYYY-MM-DD). (optional)expirationDateGte- Filter contracts with expiration date greater than or equal to the specified date. (optional)expirationDateLte- Filter contracts with expiration date less than or equal to the specified date. (optional)rootSymbol- Filter contracts by the root symbol. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK * 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/). -
-
optionLatestQuotesCall
public okhttp3.Call optionLatestQuotesCall(@Nonnull String symbols, @Nullable OptionFeed feed, ApiCallback _callback) throws ApiException Build call for optionLatestQuotes- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)_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/). -
-
optionLatestQuotes
public OptionLatestQuotesResp optionLatestQuotes(@Nonnull String symbols, @Nullable OptionFeed feed) throws ApiException Latest quotes The latest multi-quotes endpoint provides the latest bid and ask prices for each given contract symbol.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)- Returns:
- OptionLatestQuotesResp
- 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/). -
-
optionLatestQuotesWithHttpInfo
public ApiResponse<OptionLatestQuotesResp> optionLatestQuotesWithHttpInfo(@Nonnull String symbols, @Nullable OptionFeed feed) throws ApiException Latest quotes The latest multi-quotes endpoint provides the latest bid and ask prices for each given contract symbol.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)- Returns:
- ApiResponse<OptionLatestQuotesResp>
- 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/). -
-
optionLatestQuotesAsync
public okhttp3.Call optionLatestQuotesAsync(@Nonnull String symbols, @Nullable OptionFeed feed, ApiCallback<OptionLatestQuotesResp> _callback) throws ApiException Latest quotes (asynchronously) The latest multi-quotes endpoint provides the latest bid and ask prices for each given contract symbol.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)_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/). -
-
optionLatestTradesCall
public okhttp3.Call optionLatestTradesCall(@Nonnull String symbols, @Nullable OptionFeed feed, ApiCallback _callback) throws ApiException Build call for optionLatestTrades- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)_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/). -
-
optionLatestTrades
public OptionLatestTradesResp optionLatestTrades(@Nonnull String symbols, @Nullable OptionFeed feed) throws ApiException Latest trades The latest multi-trades endpoint provides the latest historical trade data for multiple given contract symbols.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)- Returns:
- OptionLatestTradesResp
- 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/). -
-
optionLatestTradesWithHttpInfo
public ApiResponse<OptionLatestTradesResp> optionLatestTradesWithHttpInfo(@Nonnull String symbols, @Nullable OptionFeed feed) throws ApiException Latest trades The latest multi-trades endpoint provides the latest historical trade data for multiple given contract symbols.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)- Returns:
- ApiResponse<OptionLatestTradesResp>
- 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/). -
-
optionLatestTradesAsync
public okhttp3.Call optionLatestTradesAsync(@Nonnull String symbols, @Nullable OptionFeed feed, ApiCallback<OptionLatestTradesResp> _callback) throws ApiException Latest trades (asynchronously) The latest multi-trades endpoint provides the latest historical trade data for multiple given contract symbols.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)_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/). -
-
optionMetaConditionsCall
public okhttp3.Call optionMetaConditionsCall(@Nonnull String ticktype, ApiCallback _callback) throws ApiException Build call for optionMetaConditions- Parameters:
ticktype- The type of ticks. (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/). -
-
optionMetaConditions
Condition codes Returns the mapping between the condition codes and names.- Parameters:
ticktype- The type of ticks. (required)- Returns:
- Map<String, String>
- 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/). -
-
optionMetaConditionsWithHttpInfo
public ApiResponse<Map<String,String>> optionMetaConditionsWithHttpInfo(@Nonnull String ticktype) throws ApiException Condition codes Returns the mapping between the condition codes and names.- Parameters:
ticktype- The type of ticks. (required)- Returns:
- ApiResponse<Map<String, String>>
- 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/). -
-
optionMetaConditionsAsync
public okhttp3.Call optionMetaConditionsAsync(@Nonnull String ticktype, ApiCallback<Map<String, String>> _callback) throws ApiExceptionCondition codes (asynchronously) Returns the mapping between the condition codes and names.- Parameters:
ticktype- The type of ticks. (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/). -
-
optionMetaExchangesCall
Build call for optionMetaExchanges- Parameters:
_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/). -
-
optionMetaExchanges
Exchange codes Returns the mapping between the option exchange codes and the corresponding exchange names.- Returns:
- Map<String, String>
- 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/). -
-
optionMetaExchangesWithHttpInfo
Exchange codes Returns the mapping between the option exchange codes and the corresponding exchange names.- Returns:
- ApiResponse<Map<String, String>>
- 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/). -
-
optionMetaExchangesAsync
public okhttp3.Call optionMetaExchangesAsync(ApiCallback<Map<String, String>> _callback) throws ApiExceptionExchange codes (asynchronously) Returns the mapping between the option exchange codes and the corresponding exchange names.- Parameters:
_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/). -
-
optionSnapshotsCall
public okhttp3.Call optionSnapshotsCall(@Nonnull String symbols, @Nullable OptionFeed feed, @Nullable OffsetDateTime updatedSince, @Nullable Integer limit, @Nullable String pageToken, ApiCallback _callback) throws ApiException Build call for optionSnapshots- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)updatedSince- Filter to snapshots that were updated since this timestamp, meaning that the timestamp of the trade or the quote is greater than or equal to this value. Format: RFC-3339 or YYYY-MM-DD. If missing, all values are returned. (optional)limit- Number of maximum snapshots to return in a response. The limit applies to the total number of data points, not the number per symbol! Use `next_page_token` to fetch the next set of responses. (optional, default to 100)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)_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/). -
-
optionSnapshots
public OptionSnapshotsResp optionSnapshots(@Nonnull String symbols, @Nullable OptionFeed feed, @Nullable OffsetDateTime updatedSince, @Nullable Integer limit, @Nullable String pageToken) throws ApiException Snapshots The snapshots endpoint provides the latest trade, latest quote and greeks for each given contract symbol.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)updatedSince- Filter to snapshots that were updated since this timestamp, meaning that the timestamp of the trade or the quote is greater than or equal to this value. Format: RFC-3339 or YYYY-MM-DD. If missing, all values are returned. (optional)limit- Number of maximum snapshots to return in a response. The limit applies to the total number of data points, not the number per symbol! Use `next_page_token` to fetch the next set of responses. (optional, default to 100)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)- Returns:
- OptionSnapshotsResp
- 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/). -
-
optionSnapshotsWithHttpInfo
public ApiResponse<OptionSnapshotsResp> optionSnapshotsWithHttpInfo(@Nonnull String symbols, @Nullable OptionFeed feed, @Nullable OffsetDateTime updatedSince, @Nullable Integer limit, @Nullable String pageToken) throws ApiException Snapshots The snapshots endpoint provides the latest trade, latest quote and greeks for each given contract symbol.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)updatedSince- Filter to snapshots that were updated since this timestamp, meaning that the timestamp of the trade or the quote is greater than or equal to this value. Format: RFC-3339 or YYYY-MM-DD. If missing, all values are returned. (optional)limit- Number of maximum snapshots to return in a response. The limit applies to the total number of data points, not the number per symbol! Use `next_page_token` to fetch the next set of responses. (optional, default to 100)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)- Returns:
- ApiResponse<OptionSnapshotsResp>
- 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/). -
-
optionSnapshotsAsync
public okhttp3.Call optionSnapshotsAsync(@Nonnull String symbols, @Nullable OptionFeed feed, @Nullable OffsetDateTime updatedSince, @Nullable Integer limit, @Nullable String pageToken, ApiCallback<OptionSnapshotsResp> _callback) throws ApiException Snapshots (asynchronously) The snapshots endpoint provides the latest trade, latest quote and greeks for each given contract symbol.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (required)feed- The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`. (optional, default to opra)updatedSince- Filter to snapshots that were updated since this timestamp, meaning that the timestamp of the trade or the quote is greater than or equal to this value. Format: RFC-3339 or YYYY-MM-DD. If missing, all values are returned. (optional)limit- Number of maximum snapshots to return in a response. The limit applies to the total number of data points, not the number per symbol! Use `next_page_token` to fetch the next set of responses. (optional, default to 100)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)_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/). -
-
optionTradesCall
public okhttp3.Call optionTradesCall(@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 optionTrades- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (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/). -
-
optionTrades
public OptionTradesResp optionTrades(@Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort) throws ApiException Historical trades The historical option trades API provides trade data for a list of contract symbols between the specified dates. The returned results are sorted by symbol first then by trade timestamp. This means that you are likely to see only one symbol in your first response if there are enough trades for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any trades were found for them.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (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:
- OptionTradesResp
- 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/). -
-
optionTradesWithHttpInfo
public ApiResponse<OptionTradesResp> optionTradesWithHttpInfo(@Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort) throws ApiException Historical trades The historical option trades API provides trade data for a list of contract symbols between the specified dates. The returned results are sorted by symbol first then by trade timestamp. This means that you are likely to see only one symbol in your first response if there are enough trades for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any trades were found for them.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (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<OptionTradesResp>
- 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/). -
-
optionTradesAsync
public okhttp3.Call optionTradesAsync(@Nonnull String symbols, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable Integer limit, @Nullable String pageToken, @Nullable Sort sort, ApiCallback<OptionTradesResp> _callback) throws ApiException Historical trades (asynchronously) The historical option trades API provides trade data for a list of contract symbols between the specified dates. The returned results are sorted by symbol first then by trade timestamp. This means that you are likely to see only one symbol in your first response if there are enough trades for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any trades were found for them.- Parameters:
symbols- A comma-separated list of contract symbols with a limit of 100. (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/). -
-