Record Class TradeCorrection

java.lang.Object
java.lang.Record
markets.alpaca.client.ws.model.TradeCorrection
Record Components:
symbol - ticker symbol
exchange - exchange code
origTradeId - original trade ID
origPrice - original trade price
origSize - original trade size
origConditions - original trade condition codes
correctedTradeId - corrected trade ID
correctedPrice - corrected trade price
correctedSize - corrected trade size
correctedConditions - corrected trade condition codes
timestamp - RFC-3339 timestamp
tape - consolidated tape identifier

public record TradeCorrection(String symbol, String exchange, long origTradeId, BigDecimal origPrice, String origSize, List<String> origConditions, long correctedTradeId, BigDecimal correctedPrice, long correctedSize, List<String> correctedConditions, String timestamp, String tape) extends Record
A trade correction event (T: "c").

Received automatically for symbols subscribed to trades. Contains both the original erroneous trade data and the corrected replacement data.

  • Constructor Details

    • TradeCorrection

      public TradeCorrection(String symbol, String exchange, long origTradeId, BigDecimal origPrice, String origSize, List<String> origConditions, long correctedTradeId, BigDecimal correctedPrice, long correctedSize, List<String> correctedConditions, String timestamp, String tape)
      Creates an instance of a TradeCorrection record class.
      Parameters:
      symbol - the value for the symbol record component
      exchange - the value for the exchange record component
      origTradeId - the value for the origTradeId record component
      origPrice - the value for the origPrice record component
      origSize - the value for the origSize record component
      origConditions - the value for the origConditions record component
      correctedTradeId - the value for the correctedTradeId record component
      correctedPrice - the value for the correctedPrice record component
      correctedSize - the value for the correctedSize record component
      correctedConditions - the value for the correctedConditions 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
    • exchange

      @SerializedName("x") public String exchange()
      Returns the value of the exchange record component.
      Returns:
      the value of the exchange record component
    • origTradeId

      @SerializedName("oi") public long origTradeId()
      Returns the value of the origTradeId record component.
      Returns:
      the value of the origTradeId record component
    • origPrice

      @SerializedName("op") public BigDecimal origPrice()
      Returns the value of the origPrice record component.
      Returns:
      the value of the origPrice record component
    • origSize

      @SerializedName("os") public String origSize()
      Returns the value of the origSize record component.
      Returns:
      the value of the origSize record component
    • origConditions

      @SerializedName("oc") public List<String> origConditions()
      Returns the value of the origConditions record component.
      Returns:
      the value of the origConditions record component
    • correctedTradeId

      @SerializedName("ci") public long correctedTradeId()
      Returns the value of the correctedTradeId record component.
      Returns:
      the value of the correctedTradeId record component
    • correctedPrice

      @SerializedName("cp") public BigDecimal correctedPrice()
      Returns the value of the correctedPrice record component.
      Returns:
      the value of the correctedPrice record component
    • correctedSize

      @SerializedName("cs") public long correctedSize()
      Returns the value of the correctedSize record component.
      Returns:
      the value of the correctedSize record component
    • correctedConditions

      @SerializedName("cc") public List<String> correctedConditions()
      Returns the value of the correctedConditions record component.
      Returns:
      the value of the correctedConditions 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