Class AssetsApi

java.lang.Object
markets.alpaca.client.openapi.broker.api.AssetsApi

public class AssetsApi extends Object
Generated client for AssetsApi 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

  • getAssetBySymbolOrId: Retrieve an Asset by ID
  • getAssetEntryRequirements: Retrieve Entry Requirements for requested assets
  • getAssets: Retrieve All Assets
  • getOptionContractSymbolOrId: Get an option contract by ID or Symbol (BETA)
  • getOptionsContracts: Get Option Contracts (BETA)
  • usCorporates: Get US corporates
  • usTreasuries: Get US treasuries
  • Constructor Details

    • AssetsApi

      public AssetsApi()
    • AssetsApi

      public AssetsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • getAssetBySymbolOrIdCall

      public okhttp3.Call getAssetBySymbolOrIdCall(@Nonnull String symbolOrAssetId, ApiCallback _callback) throws ApiException
      Build call for getAssetBySymbolOrId
      Parameters:
      symbolOrAssetId - you can use either the asset's Id or the symbol to search (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Returns asset -
      404 Asset not found -
    • getAssetBySymbolOrId

      public Asset getAssetBySymbolOrId(@Nonnull String symbolOrAssetId) throws ApiException
      Retrieve an Asset by ID Returns the requested asset, if found
      Parameters:
      symbolOrAssetId - you can use either the asset's Id or the symbol to search (required)
      Returns:
      Asset
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Returns asset -
      404 Asset not found -
    • getAssetBySymbolOrIdWithHttpInfo

      public ApiResponse<Asset> getAssetBySymbolOrIdWithHttpInfo(@Nonnull String symbolOrAssetId) throws ApiException
      Retrieve an Asset by ID Returns the requested asset, if found
      Parameters:
      symbolOrAssetId - you can use either the asset's Id or the symbol to search (required)
      Returns:
      ApiResponse<Asset>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Returns asset -
      404 Asset not found -
    • getAssetBySymbolOrIdAsync

      public okhttp3.Call getAssetBySymbolOrIdAsync(@Nonnull String symbolOrAssetId, ApiCallback<Asset> _callback) throws ApiException
      Retrieve an Asset by ID (asynchronously) Returns the requested asset, if found
      Parameters:
      symbolOrAssetId - you can use either the asset's Id or the symbol to search (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Returns asset -
      404 Asset not found -
    • getAssetEntryRequirementsCall

      public okhttp3.Call getAssetEntryRequirementsCall(@Nonnull String symbols, ApiCallback _callback) throws ApiException
      Build call for getAssetEntryRequirements
      Parameters:
      symbols - Comma-separated symbols or asset ids. The symbols (or asset ids) for which asset entry requirements are to be requested. Maximum number of symbols allowed is 500. (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 An array of asset entry requirement objects. -
    • getAssetEntryRequirements

      public List<AssetEntryRequirements> getAssetEntryRequirements(@Nonnull String symbols) throws ApiException
      Retrieve Entry Requirements for requested assets Returns all entry-requirements
      Parameters:
      symbols - Comma-separated symbols or asset ids. The symbols (or asset ids) for which asset entry requirements are to be requested. Maximum number of symbols allowed is 500. (required)
      Returns:
      List<AssetEntryRequirements>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 An array of asset entry requirement objects. -
    • getAssetEntryRequirementsWithHttpInfo

      public ApiResponse<List<AssetEntryRequirements>> getAssetEntryRequirementsWithHttpInfo(@Nonnull String symbols) throws ApiException
      Retrieve Entry Requirements for requested assets Returns all entry-requirements
      Parameters:
      symbols - Comma-separated symbols or asset ids. The symbols (or asset ids) for which asset entry requirements are to be requested. Maximum number of symbols allowed is 500. (required)
      Returns:
      ApiResponse<List<AssetEntryRequirements>>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 An array of asset entry requirement objects. -
    • getAssetEntryRequirementsAsync

      public okhttp3.Call getAssetEntryRequirementsAsync(@Nonnull String symbols, ApiCallback<List<AssetEntryRequirements>> _callback) throws ApiException
      Retrieve Entry Requirements for requested assets (asynchronously) Returns all entry-requirements
      Parameters:
      symbols - Comma-separated symbols or asset ids. The symbols (or asset ids) for which asset entry requirements are to be requested. Maximum number of symbols allowed is 500. (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 An array of asset entry requirement objects. -
    • getAssetsCall

      public okhttp3.Call getAssetsCall(@Nullable String status, @Nullable String assetClass, @Nullable List<String> attributes, ApiCallback _callback) throws ApiException
      Build call for getAssets
      Parameters:
      status - Asset status to filter by, will default to `all` (optional, default to all)
      assetClass - Asset class to filter by, `us_equity` or `crypto`. Defaults to `us_equity` (optional, default to us_equity)
      attributes - Comma separated values to query for more than one attribute. Assets which have any of the given attributes will be included. Supported values: - `ptp_no_exception`: Asset is a Publicly Traded Partnership (PTP) without a qualified notice; non-U.S. customers may incur 10% withholding on gross proceeds as per IRS guidance, and are blocked from being purchased by default. - `ptp_with_exception`: Users can open positions in these PTPs without general restrictions. - `ipo`: Accepting limit orders only before the stock begins trading on the secondary market. - `has_options`: The underlying equity has listed options available on the platform. Note: if the equity had inactive/expired contracts in the past, this will still show up. - `options_late_close`: Indicates the underlying asset's options contracts close at 4:15pm ET instead of the standard 4:00pm ET. - `fractional_eh_enabled`: Indicates the asset accepts fractional orders during extended hours sessions (pre-market, post-market, and overnight if enabled). - `overnight_tradable`: Asset is eligible for overnight (24x5) trading in supported venues on the platform. - `overnight_halted`: Asset is eligible for overnight trading but is currently halted/blocked for overnight sessions due to risk, corporate action, compliance, or venue constraints. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 An array of asset objects. -
    • getAssets

      public List<Asset> getAssets(@Nullable String status, @Nullable String assetClass, @Nullable List<String> attributes) throws ApiException
      Retrieve All Assets Returns all assets
      Parameters:
      status - Asset status to filter by, will default to `all` (optional, default to all)
      assetClass - Asset class to filter by, `us_equity` or `crypto`. Defaults to `us_equity` (optional, default to us_equity)
      attributes - Comma separated values to query for more than one attribute. Assets which have any of the given attributes will be included. Supported values: - `ptp_no_exception`: Asset is a Publicly Traded Partnership (PTP) without a qualified notice; non-U.S. customers may incur 10% withholding on gross proceeds as per IRS guidance, and are blocked from being purchased by default. - `ptp_with_exception`: Users can open positions in these PTPs without general restrictions. - `ipo`: Accepting limit orders only before the stock begins trading on the secondary market. - `has_options`: The underlying equity has listed options available on the platform. Note: if the equity had inactive/expired contracts in the past, this will still show up. - `options_late_close`: Indicates the underlying asset's options contracts close at 4:15pm ET instead of the standard 4:00pm ET. - `fractional_eh_enabled`: Indicates the asset accepts fractional orders during extended hours sessions (pre-market, post-market, and overnight if enabled). - `overnight_tradable`: Asset is eligible for overnight (24x5) trading in supported venues on the platform. - `overnight_halted`: Asset is eligible for overnight trading but is currently halted/blocked for overnight sessions due to risk, corporate action, compliance, or venue constraints. (optional)
      Returns:
      List<Asset>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 An array of asset objects. -
    • getAssetsWithHttpInfo

      public ApiResponse<List<Asset>> getAssetsWithHttpInfo(@Nullable String status, @Nullable String assetClass, @Nullable List<String> attributes) throws ApiException
      Retrieve All Assets Returns all assets
      Parameters:
      status - Asset status to filter by, will default to `all` (optional, default to all)
      assetClass - Asset class to filter by, `us_equity` or `crypto`. Defaults to `us_equity` (optional, default to us_equity)
      attributes - Comma separated values to query for more than one attribute. Assets which have any of the given attributes will be included. Supported values: - `ptp_no_exception`: Asset is a Publicly Traded Partnership (PTP) without a qualified notice; non-U.S. customers may incur 10% withholding on gross proceeds as per IRS guidance, and are blocked from being purchased by default. - `ptp_with_exception`: Users can open positions in these PTPs without general restrictions. - `ipo`: Accepting limit orders only before the stock begins trading on the secondary market. - `has_options`: The underlying equity has listed options available on the platform. Note: if the equity had inactive/expired contracts in the past, this will still show up. - `options_late_close`: Indicates the underlying asset's options contracts close at 4:15pm ET instead of the standard 4:00pm ET. - `fractional_eh_enabled`: Indicates the asset accepts fractional orders during extended hours sessions (pre-market, post-market, and overnight if enabled). - `overnight_tradable`: Asset is eligible for overnight (24x5) trading in supported venues on the platform. - `overnight_halted`: Asset is eligible for overnight trading but is currently halted/blocked for overnight sessions due to risk, corporate action, compliance, or venue constraints. (optional)
      Returns:
      ApiResponse<List<Asset>>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 An array of asset objects. -
    • getAssetsAsync

      public okhttp3.Call getAssetsAsync(@Nullable String status, @Nullable String assetClass, @Nullable List<String> attributes, ApiCallback<List<Asset>> _callback) throws ApiException
      Retrieve All Assets (asynchronously) Returns all assets
      Parameters:
      status - Asset status to filter by, will default to `all` (optional, default to all)
      assetClass - Asset class to filter by, `us_equity` or `crypto`. Defaults to `us_equity` (optional, default to us_equity)
      attributes - Comma separated values to query for more than one attribute. Assets which have any of the given attributes will be included. Supported values: - `ptp_no_exception`: Asset is a Publicly Traded Partnership (PTP) without a qualified notice; non-U.S. customers may incur 10% withholding on gross proceeds as per IRS guidance, and are blocked from being purchased by default. - `ptp_with_exception`: Users can open positions in these PTPs without general restrictions. - `ipo`: Accepting limit orders only before the stock begins trading on the secondary market. - `has_options`: The underlying equity has listed options available on the platform. Note: if the equity had inactive/expired contracts in the past, this will still show up. - `options_late_close`: Indicates the underlying asset's options contracts close at 4:15pm ET instead of the standard 4:00pm ET. - `fractional_eh_enabled`: Indicates the asset accepts fractional orders during extended hours sessions (pre-market, post-market, and overnight if enabled). - `overnight_tradable`: Asset is eligible for overnight (24x5) trading in supported venues on the platform. - `overnight_halted`: Asset is eligible for overnight trading but is currently halted/blocked for overnight sessions due to risk, corporate action, compliance, or venue constraints. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 An array of asset objects. -
    • getOptionContractSymbolOrIdCall

      public okhttp3.Call getOptionContractSymbolOrIdCall(@Nonnull String symbolOrId, ApiCallback _callback) throws ApiException
      Build call for getOptionContractSymbolOrId
      Parameters:
      symbolOrId - The contract symbol or ID. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 An option contract -
      404 Not Found -
    • getOptionContractSymbolOrId

      public OptionContract getOptionContractSymbolOrId(@Nonnull String symbolOrId) throws ApiException
      Get an option contract by ID or Symbol (BETA) Get an option contract by symbol or contract ID. The symbol or id should be passed in as a path parameter.
      Parameters:
      symbolOrId - The contract symbol or ID. (required)
      Returns:
      OptionContract
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 An option contract -
      404 Not Found -
    • getOptionContractSymbolOrIdWithHttpInfo

      public ApiResponse<OptionContract> getOptionContractSymbolOrIdWithHttpInfo(@Nonnull String symbolOrId) throws ApiException
      Get an option contract by ID or Symbol (BETA) Get an option contract by symbol or contract ID. The symbol or id should be passed in as a path parameter.
      Parameters:
      symbolOrId - The contract symbol or ID. (required)
      Returns:
      ApiResponse<OptionContract>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 An option contract -
      404 Not Found -
    • getOptionContractSymbolOrIdAsync

      public okhttp3.Call getOptionContractSymbolOrIdAsync(@Nonnull String symbolOrId, ApiCallback<OptionContract> _callback) throws ApiException
      Get an option contract by ID or Symbol (BETA) (asynchronously) Get an option contract by symbol or contract ID. The symbol or id should be passed in as a path parameter.
      Parameters:
      symbolOrId - The contract symbol or ID. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 An option contract -
      404 Not Found -
    • getOptionsContractsCall

      public okhttp3.Call getOptionsContractsCall(@Nullable String underlyingSymbols, @Nullable Boolean showDeliverables, @Nullable String status, @Nullable LocalDate expirationDate, @Nullable LocalDate expirationDateGte, @Nullable LocalDate expirationDateLte, @Nullable String rootSymbol, @Nullable String type, @Nullable String style, @Nullable BigDecimal strikePriceGte, @Nullable BigDecimal strikePriceLte, @Nullable String pageToken, @Nullable Integer limit, @Nullable Boolean ppind, ApiCallback _callback) throws ApiException
      Build call for getOptionsContracts
      Parameters:
      underlyingSymbols - Filter contracts by one or more underlying symbols. (optional)
      showDeliverables - Include deliverables array in the response. (optional)
      status - Filter contracts by status (active/inactive). By default only active contracts are returned. (optional)
      expirationDate - Filter contracts by the exact expiration date (format: YYYY-MM-DD). If no expiration date filters (`expiration_date`, `expiration_date_gte`, or `expiration_date_lte`) are provided, the endpoint defaults to returning contracts with expiration dates on or before the upcoming weekend. (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. By default this is set to the next weekend. (optional)
      rootSymbol - Filter contracts by the root symbol. (optional)
      type - Filter contracts by the type (call/put). (optional)
      style - Filter contracts by the style (american/european). (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)
      pageToken - Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)
      limit - The number of contracts to limit per page (default=100, max=10000). (optional)
      ppind - The ppind(Penny Program Indicator) field indicates whether an option contract is eligible for penny price increments, with `true` meaning it is part of the Penny Program and `false` meaning it is not. (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 Successful Response. -
    • getOptionsContracts

      public GetOptionsContracts200Response getOptionsContracts(@Nullable String underlyingSymbols, @Nullable Boolean showDeliverables, @Nullable String status, @Nullable LocalDate expirationDate, @Nullable LocalDate expirationDateGte, @Nullable LocalDate expirationDateLte, @Nullable String rootSymbol, @Nullable String type, @Nullable String style, @Nullable BigDecimal strikePriceGte, @Nullable BigDecimal strikePriceLte, @Nullable String pageToken, @Nullable Integer limit, @Nullable Boolean ppind) throws ApiException
      Get Option Contracts (BETA) This endpoint allows you to retrieve a list of option contracts based on various filtering criteria. By default only active contracts that expire before the upcoming weekend are returned.
      Parameters:
      underlyingSymbols - Filter contracts by one or more underlying symbols. (optional)
      showDeliverables - Include deliverables array in the response. (optional)
      status - Filter contracts by status (active/inactive). By default only active contracts are returned. (optional)
      expirationDate - Filter contracts by the exact expiration date (format: YYYY-MM-DD). If no expiration date filters (`expiration_date`, `expiration_date_gte`, or `expiration_date_lte`) are provided, the endpoint defaults to returning contracts with expiration dates on or before the upcoming weekend. (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. By default this is set to the next weekend. (optional)
      rootSymbol - Filter contracts by the root symbol. (optional)
      type - Filter contracts by the type (call/put). (optional)
      style - Filter contracts by the style (american/european). (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)
      pageToken - Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)
      limit - The number of contracts to limit per page (default=100, max=10000). (optional)
      ppind - The ppind(Penny Program Indicator) field indicates whether an option contract is eligible for penny price increments, with `true` meaning it is part of the Penny Program and `false` meaning it is not. (optional)
      Returns:
      GetOptionsContracts200Response
      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 Successful Response. -
    • getOptionsContractsWithHttpInfo

      public ApiResponse<GetOptionsContracts200Response> getOptionsContractsWithHttpInfo(@Nullable String underlyingSymbols, @Nullable Boolean showDeliverables, @Nullable String status, @Nullable LocalDate expirationDate, @Nullable LocalDate expirationDateGte, @Nullable LocalDate expirationDateLte, @Nullable String rootSymbol, @Nullable String type, @Nullable String style, @Nullable BigDecimal strikePriceGte, @Nullable BigDecimal strikePriceLte, @Nullable String pageToken, @Nullable Integer limit, @Nullable Boolean ppind) throws ApiException
      Get Option Contracts (BETA) This endpoint allows you to retrieve a list of option contracts based on various filtering criteria. By default only active contracts that expire before the upcoming weekend are returned.
      Parameters:
      underlyingSymbols - Filter contracts by one or more underlying symbols. (optional)
      showDeliverables - Include deliverables array in the response. (optional)
      status - Filter contracts by status (active/inactive). By default only active contracts are returned. (optional)
      expirationDate - Filter contracts by the exact expiration date (format: YYYY-MM-DD). If no expiration date filters (`expiration_date`, `expiration_date_gte`, or `expiration_date_lte`) are provided, the endpoint defaults to returning contracts with expiration dates on or before the upcoming weekend. (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. By default this is set to the next weekend. (optional)
      rootSymbol - Filter contracts by the root symbol. (optional)
      type - Filter contracts by the type (call/put). (optional)
      style - Filter contracts by the style (american/european). (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)
      pageToken - Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)
      limit - The number of contracts to limit per page (default=100, max=10000). (optional)
      ppind - The ppind(Penny Program Indicator) field indicates whether an option contract is eligible for penny price increments, with `true` meaning it is part of the Penny Program and `false` meaning it is not. (optional)
      Returns:
      ApiResponse<GetOptionsContracts200Response>
      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 Successful Response. -
    • getOptionsContractsAsync

      public okhttp3.Call getOptionsContractsAsync(@Nullable String underlyingSymbols, @Nullable Boolean showDeliverables, @Nullable String status, @Nullable LocalDate expirationDate, @Nullable LocalDate expirationDateGte, @Nullable LocalDate expirationDateLte, @Nullable String rootSymbol, @Nullable String type, @Nullable String style, @Nullable BigDecimal strikePriceGte, @Nullable BigDecimal strikePriceLte, @Nullable String pageToken, @Nullable Integer limit, @Nullable Boolean ppind, ApiCallback<GetOptionsContracts200Response> _callback) throws ApiException
      Get Option Contracts (BETA) (asynchronously) This endpoint allows you to retrieve a list of option contracts based on various filtering criteria. By default only active contracts that expire before the upcoming weekend are returned.
      Parameters:
      underlyingSymbols - Filter contracts by one or more underlying symbols. (optional)
      showDeliverables - Include deliverables array in the response. (optional)
      status - Filter contracts by status (active/inactive). By default only active contracts are returned. (optional)
      expirationDate - Filter contracts by the exact expiration date (format: YYYY-MM-DD). If no expiration date filters (`expiration_date`, `expiration_date_gte`, or `expiration_date_lte`) are provided, the endpoint defaults to returning contracts with expiration dates on or before the upcoming weekend. (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. By default this is set to the next weekend. (optional)
      rootSymbol - Filter contracts by the root symbol. (optional)
      type - Filter contracts by the type (call/put). (optional)
      style - Filter contracts by the style (american/european). (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)
      pageToken - Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available. (optional)
      limit - The number of contracts to limit per page (default=100, max=10000). (optional)
      ppind - The ppind(Penny Program Indicator) field indicates whether an option contract is eligible for penny price increments, with `true` meaning it is part of the Penny Program and `false` meaning it is not. (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 Successful Response. -
    • usCorporatesCall

      public okhttp3.Call usCorporatesCall(@Nullable BondStatus bondStatus, @Nullable String isins, @Nullable String cusips, @Nullable String tickers, ApiCallback _callback) throws ApiException
      Build call for usCorporates
      Parameters:
      bondStatus - (optional)
      isins - A comma-separated list of ISINs with a limit of 1000. (optional)
      cusips - A comma-separated list of CUSIPs with a limit of 1000. (optional)
      tickers - A comma-separated list of tickers with a limit of 1000. (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 or on the Community Forum. -
    • usCorporates

      public UsCorporatesResp usCorporates(@Nullable BondStatus bondStatus, @Nullable String isins, @Nullable String cusips, @Nullable String tickers) throws ApiException
      Get US corporates Serves the list of US corporates available at Alpaca. The response is sorted by ISIN.
      Parameters:
      bondStatus - (optional)
      isins - A comma-separated list of ISINs with a limit of 1000. (optional)
      cusips - A comma-separated list of CUSIPs with a limit of 1000. (optional)
      tickers - A comma-separated list of tickers with a limit of 1000. (optional)
      Returns:
      UsCorporatesResp
      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 or on the Community Forum. -
    • usCorporatesWithHttpInfo

      public ApiResponse<UsCorporatesResp> usCorporatesWithHttpInfo(@Nullable BondStatus bondStatus, @Nullable String isins, @Nullable String cusips, @Nullable String tickers) throws ApiException
      Get US corporates Serves the list of US corporates available at Alpaca. The response is sorted by ISIN.
      Parameters:
      bondStatus - (optional)
      isins - A comma-separated list of ISINs with a limit of 1000. (optional)
      cusips - A comma-separated list of CUSIPs with a limit of 1000. (optional)
      tickers - A comma-separated list of tickers with a limit of 1000. (optional)
      Returns:
      ApiResponse<UsCorporatesResp>
      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 or on the Community Forum. -
    • usCorporatesAsync

      public okhttp3.Call usCorporatesAsync(@Nullable BondStatus bondStatus, @Nullable String isins, @Nullable String cusips, @Nullable String tickers, ApiCallback<UsCorporatesResp> _callback) throws ApiException
      Get US corporates (asynchronously) Serves the list of US corporates available at Alpaca. The response is sorted by ISIN.
      Parameters:
      bondStatus - (optional)
      isins - A comma-separated list of ISINs with a limit of 1000. (optional)
      cusips - A comma-separated list of CUSIPs with a limit of 1000. (optional)
      tickers - A comma-separated list of tickers with a limit of 1000. (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 or on the Community Forum. -
    • usTreasuriesCall

      public okhttp3.Call usTreasuriesCall(@Nullable TreasurySubtype subtype, @Nullable BondStatus bondStatus, @Nullable String cusips, @Nullable String isins, ApiCallback _callback) throws ApiException
      Build call for usTreasuries
      Parameters:
      subtype - (optional)
      bondStatus - (optional)
      cusips - A comma-separated list of CUSIPs with a limit of 1000. (optional)
      isins - A comma-separated list of ISINs with a limit of 1000. (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 -
      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 or on the Community Forum. -
    • usTreasuries

      public UsTreasuriesResp usTreasuries(@Nullable TreasurySubtype subtype, @Nullable BondStatus bondStatus, @Nullable String cusips, @Nullable String isins) throws ApiException
      Get US treasuries Serves the list of US treasuries available at Alpaca. The response is sorted by ISIN.
      Parameters:
      subtype - (optional)
      bondStatus - (optional)
      cusips - A comma-separated list of CUSIPs with a limit of 1000. (optional)
      isins - A comma-separated list of ISINs with a limit of 1000. (optional)
      Returns:
      UsTreasuriesResp
      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 -
      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 or on the Community Forum. -
    • usTreasuriesWithHttpInfo

      public ApiResponse<UsTreasuriesResp> usTreasuriesWithHttpInfo(@Nullable TreasurySubtype subtype, @Nullable BondStatus bondStatus, @Nullable String cusips, @Nullable String isins) throws ApiException
      Get US treasuries Serves the list of US treasuries available at Alpaca. The response is sorted by ISIN.
      Parameters:
      subtype - (optional)
      bondStatus - (optional)
      cusips - A comma-separated list of CUSIPs with a limit of 1000. (optional)
      isins - A comma-separated list of ISINs with a limit of 1000. (optional)
      Returns:
      ApiResponse<UsTreasuriesResp>
      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 -
      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 or on the Community Forum. -
    • usTreasuriesAsync

      public okhttp3.Call usTreasuriesAsync(@Nullable TreasurySubtype subtype, @Nullable BondStatus bondStatus, @Nullable String cusips, @Nullable String isins, ApiCallback<UsTreasuriesResp> _callback) throws ApiException
      Get US treasuries (asynchronously) Serves the list of US treasuries available at Alpaca. The response is sorted by ISIN.
      Parameters:
      subtype - (optional)
      bondStatus - (optional)
      cusips - A comma-separated list of CUSIPs with a limit of 1000. (optional)
      isins - A comma-separated list of ISINs with a limit of 1000. (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 -
      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 or on the Community Forum. -