Enum Class AssetClass

java.lang.Object
java.lang.Enum<AssetClass>
markets.alpaca.client.openapi.trading.model.AssetClass
All Implemented Interfaces:
Serializable, Comparable<AssetClass>, Constable

public enum AssetClass extends Enum<AssetClass> implements Serializable
This represents the category to which the asset belongs to. It serves to identify the nature of the financial instrument, with options including \"us_equity\" for U.S. equities, \"us_option\" for U.S. options, \"crypto\" for cryptocurrencies, and \"ipo\" for IPO indications of interest/orders. This `asset_class: ipo` value is distinct from the assets API `attributes: [\"ipo\"]` flag.
  • Enum Constant Details

    • US_EQUITY

      public static final AssetClass US_EQUITY
    • US_OPTION

      public static final AssetClass US_OPTION
    • CRYPTO

      public static final AssetClass CRYPTO
    • CRYPTO_PERP

      public static final AssetClass CRYPTO_PERP
    • TREASURY

      public static final AssetClass TREASURY
    • CORPORATE

      public static final AssetClass CORPORATE
    • GLOBAL_EQUITY

      public static final AssetClass GLOBAL_EQUITY
    • US_INDEX

      public static final AssetClass US_INDEX
    • US_EQUITY_CHAIN

      public static final AssetClass US_EQUITY_CHAIN
    • IPO

      public static final AssetClass IPO
  • Method Details

    • values

      public static AssetClass[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AssetClass valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<AssetClass>
    • fromValue

      public static AssetClass fromValue(String value)
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Throws:
      IOException