java.lang.Object
markets.alpaca.client.openapi.trading.model.Assets
All Implemented Interfaces:
Serializable

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class Assets extends Object implements Serializable
The assets API serves as the master list of assets available for trade and data consumption from Alpaca. Assets are sorted by asset class, exchange and symbol. Some assets are only available for data consumption via Polygon, and are not tradable with Alpaca. These assets will be marked with the flag tradable=false.
See Also:
  • Field Details

  • Constructor Details

    • Assets

      public Assets()
  • Method Details

    • attributes

      public Assets attributes(@Nullable List<AssetAttribute> attributes)
    • addAttributesItem

      public Assets addAttributesItem(AssetAttribute attributesItem)
    • getAttributes

      @Nullable public List<AssetAttribute> getAttributes()
      Get attributes
      Returns:
      attributes
    • setAttributes

      public void setAttributes(@Nullable List<AssetAttribute> attributes)
    • borrowStatus

      public Assets borrowStatus(@Nullable Assets.BorrowStatusEnum borrowStatus)
    • getBorrowStatus

      @Nullable public Assets.BorrowStatusEnum getBorrowStatus()
      Borrow status for US equity assets. This field is omitted for non-US-equity assets.
      Returns:
      borrowStatus
    • setBorrowStatus

      public void setBorrowStatus(@Nullable Assets.BorrowStatusEnum borrowStatus)
    • propertyClass

      public Assets propertyClass(@Nonnull AssetClass propertyClass)
    • getPropertyClass

      @Nonnull public AssetClass getPropertyClass()
      Get propertyClass
      Returns:
      propertyClass
    • setPropertyClass

      public void setPropertyClass(@Nonnull AssetClass propertyClass)
    • cusip

      public Assets cusip(@Nullable String cusip)
    • getCusip

      @Nullable public String getCusip()
      The CUSIP identifier for the asset (US Equities only). To request a specific CUSIP, please reach out to Alpaca support.
      Returns:
      cusip
    • setCusip

      public void setCusip(@Nullable String cusip)
    • easyToBorrow

      @Deprecated public Assets easyToBorrow(@Nonnull Boolean easyToBorrow)
      Deprecated.
    • getEasyToBorrow

      @Deprecated @Nonnull public Boolean getEasyToBorrow()
      Deprecated.
      **deprecated**: Please use borrow_status instead. Asset is easy-to-borrow or not (filtering for easy_to_borrow = True is the best way to check whether the name is currently available to short at Alpaca).
      Returns:
      easyToBorrow
    • setEasyToBorrow

      @Deprecated public void setEasyToBorrow(@Nonnull Boolean easyToBorrow)
      Deprecated.
    • exchange

      public Assets exchange(@Nonnull Exchange exchange)
    • getExchange

      @Nonnull public Exchange getExchange()
      Get exchange
      Returns:
      exchange
    • setExchange

      public void setExchange(@Nonnull Exchange exchange)
    • fractionable

      public Assets fractionable(@Nonnull Boolean fractionable)
    • getFractionable

      @Nonnull public Boolean getFractionable()
      Asset is fractionable or not
      Returns:
      fractionable
    • setFractionable

      public void setFractionable(@Nonnull Boolean fractionable)
    • id

      public Assets id(@Nonnull UUID id)
    • getId

      @Nonnull public UUID getId()
      Asset ID
      Returns:
      id
    • setId

      public void setId(@Nonnull UUID id)
    • maintenanceMarginRequirement

      @Deprecated public Assets maintenanceMarginRequirement(@Nullable BigDecimal maintenanceMarginRequirement)
      Deprecated.
    • getMaintenanceMarginRequirement

      @Deprecated @Nullable public BigDecimal getMaintenanceMarginRequirement()
      Deprecated.
      **deprecated**: Please use margin_requirement_long or margin_requirement_short instead. Note that these fields are of type string. Shows the margin requirement percentage for the asset (equities only).
      Returns:
      maintenanceMarginRequirement
    • setMaintenanceMarginRequirement

      @Deprecated public void setMaintenanceMarginRequirement(@Nullable BigDecimal maintenanceMarginRequirement)
      Deprecated.
    • marginRequirementLong

      public Assets marginRequirementLong(@Nullable String marginRequirementLong)
    • getMarginRequirementLong

      @Nullable public String getMarginRequirementLong()
      The margin requirement percentage for the asset's long positions (equities only).
      Returns:
      marginRequirementLong
    • setMarginRequirementLong

      public void setMarginRequirementLong(@Nullable String marginRequirementLong)
    • marginRequirementShort

      public Assets marginRequirementShort(@Nullable String marginRequirementShort)
    • getMarginRequirementShort

      @Nullable public String getMarginRequirementShort()
      The margin requirement percentage for the asset's short positions (equities only).
      Returns:
      marginRequirementShort
    • setMarginRequirementShort

      public void setMarginRequirementShort(@Nullable String marginRequirementShort)
    • marginable

      public Assets marginable(@Nonnull Boolean marginable)
    • getMarginable

      @Nonnull public Boolean getMarginable()
      Asset is marginable or not
      Returns:
      marginable
    • setMarginable

      public void setMarginable(@Nonnull Boolean marginable)
    • minOrderSize

      public Assets minOrderSize(@Nullable BigDecimal minOrderSize)
    • getMinOrderSize

      @Nullable public BigDecimal getMinOrderSize()
      Minimum order size. Field available for crypto only.
      Returns:
      minOrderSize
    • setMinOrderSize

      public void setMinOrderSize(@Nullable BigDecimal minOrderSize)
    • minTradeIncrement

      public Assets minTradeIncrement(@Nullable BigDecimal minTradeIncrement)
    • getMinTradeIncrement

      @Nullable public BigDecimal getMinTradeIncrement()
      Amount a trade quantity can be incremented by. Field available for crypto only.
      Returns:
      minTradeIncrement
    • setMinTradeIncrement

      public void setMinTradeIncrement(@Nullable BigDecimal minTradeIncrement)
    • name

      public Assets name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      The official name of the asset
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • priceIncrement

      public Assets priceIncrement(@Nullable BigDecimal priceIncrement)
    • getPriceIncrement

      @Nullable public BigDecimal getPriceIncrement()
      Amount the price can be incremented by. Field available for crypto only.
      Returns:
      priceIncrement
    • setPriceIncrement

      public void setPriceIncrement(@Nullable BigDecimal priceIncrement)
    • shortable

      public Assets shortable(@Nonnull Boolean shortable)
    • getShortable

      @Nonnull public Boolean getShortable()
      Asset is shortable or not
      Returns:
      shortable
    • setShortable

      public void setShortable(@Nonnull Boolean shortable)
    • status

      public Assets status(@Nonnull Assets.StatusEnum status)
    • getStatus

      @Nonnull public Assets.StatusEnum getStatus()
      active or inactive
      Returns:
      status
    • setStatus

      public void setStatus(@Nonnull Assets.StatusEnum status)
    • symbol

      public Assets symbol(@Nonnull String symbol)
    • getSymbol

      @Nonnull public String getSymbol()
      The symbol of the asset
      Returns:
      symbol
    • setSymbol

      public void setSymbol(@Nonnull String symbol)
    • tradable

      public Assets tradable(@Nonnull Boolean tradable)
    • getTradable

      @Nonnull public Boolean getTradable()
      Asset is tradable on Alpaca or not
      Returns:
      tradable
    • setTradable

      public void setTradable(@Nonnull Boolean tradable)
    • putAdditionalProperty

      public Assets putAdditionalProperty(String key, Object value)
      Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
      Parameters:
      key - name of the property
      value - value of the property
      Returns:
      the Assets instance itself
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      a map of objects
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - name of the property
      Returns:
      an object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to Assets
    • fromJson

      public static Assets fromJson(String jsonString) throws IOException
      Create an instance of Assets given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of Assets
      Throws:
      IOException - if the JSON string is invalid with respect to Assets
    • toJson

      public String toJson()
      Convert an instance of Assets to an JSON string
      Returns:
      JSON string