Record Class TradeCancelError

java.lang.Object
java.lang.Record
markets.alpaca.client.ws.model.TradeCancelError
Record Components:
symbol - ticker symbol
tradeId - trade ID
exchange - exchange code
price - trade price
size - trade size
action - "C" for cancel, "E" for error
timestamp - RFC-3339 timestamp
tape - consolidated tape identifier

public record TradeCancelError(String symbol, long tradeId, String exchange, BigDecimal price, long size, String action, String timestamp, String tape) extends Record
A trade cancellation or error event (T: "x").

Received automatically for symbols subscribed to trades.

  • Constructor Details

    • TradeCancelError

      public TradeCancelError(String symbol, long tradeId, String exchange, BigDecimal price, long size, String action, String timestamp, String tape)
      Creates an instance of a TradeCancelError record class.
      Parameters:
      symbol - the value for the symbol record component
      tradeId - the value for the tradeId record component
      exchange - the value for the exchange record component
      price - the value for the price record component
      size - the value for the size record component
      action - the value for the action 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
    • tradeId

      @SerializedName("i") public long tradeId()
      Returns the value of the tradeId record component.
      Returns:
      the value of the tradeId record component
    • exchange

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

      @SerializedName("p") public BigDecimal price()
      Returns the value of the price record component.
      Returns:
      the value of the price record component
    • size

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

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