Record Class StockQuote

java.lang.Object
java.lang.Record
markets.alpaca.client.ws.model.StockQuote
Record Components:
symbol - ticker symbol
askExchange - ask exchange code
askPrice - ask price
askSize - ask size in shares
bidExchange - bid exchange code
bidPrice - bid price
bidSize - bid size in shares
tradeSize - trade size (if applicable)
conditions - quote condition codes (may be null or empty)
timestamp - RFC-3339 timestamp with nanosecond precision
tape - consolidated tape identifier

public record StockQuote(String symbol, String askExchange, BigDecimal askPrice, long askSize, String bidExchange, BigDecimal bidPrice, long bidSize, long tradeSize, List<String> conditions, String timestamp, String tape) extends Record
A National Best Bid and Offer (NBBO) quote update (T: "q").
  • Constructor Details

    • StockQuote

      public StockQuote(String symbol, String askExchange, BigDecimal askPrice, long askSize, String bidExchange, BigDecimal bidPrice, long bidSize, long tradeSize, List<String> conditions, String timestamp, String tape)
      Creates an instance of a StockQuote record class.
      Parameters:
      symbol - the value for the symbol record component
      askExchange - the value for the askExchange record component
      askPrice - the value for the askPrice record component
      askSize - the value for the askSize record component
      bidExchange - the value for the bidExchange record component
      bidPrice - the value for the bidPrice record component
      bidSize - the value for the bidSize record component
      tradeSize - the value for the tradeSize record component
      conditions - the value for the conditions record component
      timestamp - the value for the timestamp record component
      tape - the value for the tape record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • symbol

      @SerializedName("S") public String symbol()
      Returns the value of the symbol record component.
      Returns:
      the value of the symbol record component
    • askExchange

      @SerializedName("ax") public String askExchange()
      Returns the value of the askExchange record component.
      Returns:
      the value of the askExchange record component
    • askPrice

      @SerializedName("ap") public BigDecimal askPrice()
      Returns the value of the askPrice record component.
      Returns:
      the value of the askPrice record component
    • askSize

      @SerializedName("as") public long askSize()
      Returns the value of the askSize record component.
      Returns:
      the value of the askSize record component
    • bidExchange

      @SerializedName("bx") public String bidExchange()
      Returns the value of the bidExchange record component.
      Returns:
      the value of the bidExchange record component
    • bidPrice

      @SerializedName("bp") public BigDecimal bidPrice()
      Returns the value of the bidPrice record component.
      Returns:
      the value of the bidPrice record component
    • bidSize

      @SerializedName("bs") public long bidSize()
      Returns the value of the bidSize record component.
      Returns:
      the value of the bidSize record component
    • tradeSize

      @SerializedName("s") public long tradeSize()
      Returns the value of the tradeSize record component.
      Returns:
      the value of the tradeSize record component
    • conditions

      @SerializedName("c") public List<String> conditions()
      Returns the value of the conditions record component.
      Returns:
      the value of the conditions record component
    • timestamp

      @SerializedName("t") public String timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • tape

      @SerializedName("z") public String tape()
      Returns the value of the tape record component.
      Returns:
      the value of the tape record component