Class UsTreasury

java.lang.Object
markets.alpaca.client.openapi.broker.model.UsTreasury
All Implemented Interfaces:
Serializable

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class UsTreasury extends Object implements Serializable
A US treasury
See Also:
  • Field Details

  • Constructor Details

    • UsTreasury

      public UsTreasury()
  • Method Details

    • bondStatus

      public UsTreasury bondStatus(@Nonnull BondStatus bondStatus)
    • getBondStatus

      @Nonnull public BondStatus getBondStatus()
      Get bondStatus
      Returns:
      bondStatus
    • setBondStatus

      public void setBondStatus(@Nonnull BondStatus bondStatus)
    • closePrice

      public UsTreasury closePrice(@Nullable Double closePrice)
    • getClosePrice

      @Nullable public Double getClosePrice()
      The price of the last transaction of a security before the market closes for normal trading, shown as a percentage of par value
      Returns:
      closePrice
    • setClosePrice

      public void setClosePrice(@Nullable Double closePrice)
    • closePriceDate

      public UsTreasury closePriceDate(@Nullable LocalDate closePriceDate)
    • getClosePriceDate

      @Nullable public LocalDate getClosePriceDate()
      The date of the close price
      Returns:
      closePriceDate
    • setClosePriceDate

      public void setClosePriceDate(@Nullable LocalDate closePriceDate)
    • closeYieldToMaturity

      public UsTreasury closeYieldToMaturity(@Nullable Double closeYieldToMaturity)
    • getCloseYieldToMaturity

      @Nullable public Double getCloseYieldToMaturity()
      Yield to maturity of the treasury after the last close
      Returns:
      closeYieldToMaturity
    • setCloseYieldToMaturity

      public void setCloseYieldToMaturity(@Nullable Double closeYieldToMaturity)
    • closeYieldToWorst

      public UsTreasury closeYieldToWorst(@Nullable Double closeYieldToWorst)
    • getCloseYieldToWorst

      @Nullable public Double getCloseYieldToWorst()
      Yield to worst of the treasury after the last close
      Returns:
      closeYieldToWorst
    • setCloseYieldToWorst

      public void setCloseYieldToWorst(@Nullable Double closeYieldToWorst)
    • coupon

      public UsTreasury coupon(@Nonnull Double coupon)
    • getCoupon

      @Nonnull public Double getCoupon()
      The annual interest rate paid on the bond as a percentage of par value
      Returns:
      coupon
    • setCoupon

      public void setCoupon(@Nonnull Double coupon)
    • couponFrequency

      public UsTreasury couponFrequency(@Nonnull CouponFrequency couponFrequency)
    • getCouponFrequency

      @Nonnull public CouponFrequency getCouponFrequency()
      Get couponFrequency
      Returns:
      couponFrequency
    • setCouponFrequency

      public void setCouponFrequency(@Nonnull CouponFrequency couponFrequency)
    • couponType

      public UsTreasury couponType(@Nonnull CouponType couponType)
    • getCouponType

      @Nonnull public CouponType getCouponType()
      Get couponType
      Returns:
      couponType
    • setCouponType

      public void setCouponType(@Nonnull CouponType couponType)
    • cusip

      public UsTreasury cusip(@Nonnull String cusip)
    • getCusip

      @Nonnull public String getCusip()
      CUSIP is a nine-character alphanumeric code that uniquely identifies the security
      Returns:
      cusip
    • setCusip

      public void setCusip(@Nonnull String cusip)
    • description

      public UsTreasury description(@Nonnull String description)
    • getDescription

      @Nonnull public String getDescription()
      Description of the treasury
      Returns:
      description
    • setDescription

      public void setDescription(@Nonnull String description)
    • descriptionShort

      public UsTreasury descriptionShort(@Nonnull String descriptionShort)
    • getDescriptionShort

      @Nonnull public String getDescriptionShort()
      Short description of the treasury
      Returns:
      descriptionShort
    • setDescriptionShort

      public void setDescriptionShort(@Nonnull String descriptionShort)
    • firstCouponDate

      public UsTreasury firstCouponDate(@Nullable LocalDate firstCouponDate)
    • getFirstCouponDate

      @Nullable public LocalDate getFirstCouponDate()
      The date of the first coupon payment
      Returns:
      firstCouponDate
    • setFirstCouponDate

      public void setFirstCouponDate(@Nullable LocalDate firstCouponDate)
    • isin

      public UsTreasury isin(@Nonnull String isin)
    • getIsin

      @Nonnull public String getIsin()
      International Securities Identification Number
      Returns:
      isin
    • setIsin

      public void setIsin(@Nonnull String isin)
    • issueDate

      public UsTreasury issueDate(@Nonnull LocalDate issueDate)
    • getIssueDate

      @Nonnull public LocalDate getIssueDate()
      The date on which the bond was issued
      Returns:
      issueDate
    • setIssueDate

      public void setIssueDate(@Nonnull LocalDate issueDate)
    • lastCouponDate

      public UsTreasury lastCouponDate(@Nullable LocalDate lastCouponDate)
    • getLastCouponDate

      @Nullable public LocalDate getLastCouponDate()
      The date of the last coupon payment
      Returns:
      lastCouponDate
    • setLastCouponDate

      public void setLastCouponDate(@Nullable LocalDate lastCouponDate)
    • maturityDate

      public UsTreasury maturityDate(@Nonnull LocalDate maturityDate)
    • getMaturityDate

      @Nonnull public LocalDate getMaturityDate()
      The date on which the bond matures
      Returns:
      maturityDate
    • setMaturityDate

      public void setMaturityDate(@Nonnull LocalDate maturityDate)
    • nextCouponDate

      public UsTreasury nextCouponDate(@Nullable LocalDate nextCouponDate)
    • getNextCouponDate

      @Nullable public LocalDate getNextCouponDate()
      The date of the next coupon payment
      Returns:
      nextCouponDate
    • setNextCouponDate

      public void setNextCouponDate(@Nullable LocalDate nextCouponDate)
    • subtype

      public UsTreasury subtype(@Nonnull TreasurySubtype subtype)
    • getSubtype

      @Nonnull public TreasurySubtype getSubtype()
      Get subtype
      Returns:
      subtype
    • setSubtype

      public void setSubtype(@Nonnull TreasurySubtype subtype)
    • tradable

      public UsTreasury tradable(@Nonnull Boolean tradable)
    • getTradable

      @Nonnull public Boolean getTradable()
      Whether the treasury is tradable
      Returns:
      tradable
    • setTradable

      public void setTradable(@Nonnull Boolean tradable)
    • putAdditionalProperty

      public UsTreasury 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 UsTreasury 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 UsTreasury
    • fromJson

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

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