Package markets.alpaca.client.ws.model
Record Class TradeCorrection
java.lang.Object
java.lang.Record
markets.alpaca.client.ws.model.TradeCorrection
- Record Components:
symbol- ticker symbolexchange- exchange codeorigTradeId- original trade IDorigPrice- original trade priceorigSize- original trade sizeorigConditions- original trade condition codescorrectedTradeId- corrected trade IDcorrectedPrice- corrected trade pricecorrectedSize- corrected trade sizecorrectedConditions- corrected trade condition codestimestamp- RFC-3339 timestamptape- 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 Summary
ConstructorsConstructorDescriptionTradeCorrection(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 aTradeCorrectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecorrectedConditionsrecord component.Returns the value of thecorrectedPricerecord component.longReturns the value of thecorrectedSizerecord component.longReturns the value of thecorrectedTradeIdrecord component.final booleanIndicates whether some other object is "equal to" this one.exchange()Returns the value of theexchangerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theorigConditionsrecord component.Returns the value of theorigPricerecord component.origSize()Returns the value of theorigSizerecord component.longReturns the value of theorigTradeIdrecord component.symbol()Returns the value of thesymbolrecord component.tape()Returns the value of thetaperecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
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 aTradeCorrectionrecord class.- Parameters:
symbol- the value for thesymbolrecord componentexchange- the value for theexchangerecord componentorigTradeId- the value for theorigTradeIdrecord componentorigPrice- the value for theorigPricerecord componentorigSize- the value for theorigSizerecord componentorigConditions- the value for theorigConditionsrecord componentcorrectedTradeId- the value for thecorrectedTradeIdrecord componentcorrectedPrice- the value for thecorrectedPricerecord componentcorrectedSize- the value for thecorrectedSizerecord componentcorrectedConditions- the value for thecorrectedConditionsrecord componenttimestamp- the value for thetimestamprecord componenttape- the value for thetaperecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
symbol
Returns the value of thesymbolrecord component.- Returns:
- the value of the
symbolrecord component
-
exchange
Returns the value of theexchangerecord component.- Returns:
- the value of the
exchangerecord component
-
origTradeId
@SerializedName("oi") public long origTradeId()Returns the value of theorigTradeIdrecord component.- Returns:
- the value of the
origTradeIdrecord component
-
origPrice
Returns the value of theorigPricerecord component.- Returns:
- the value of the
origPricerecord component
-
origSize
Returns the value of theorigSizerecord component.- Returns:
- the value of the
origSizerecord component
-
origConditions
Returns the value of theorigConditionsrecord component.- Returns:
- the value of the
origConditionsrecord component
-
correctedTradeId
@SerializedName("ci") public long correctedTradeId()Returns the value of thecorrectedTradeIdrecord component.- Returns:
- the value of the
correctedTradeIdrecord component
-
correctedPrice
Returns the value of thecorrectedPricerecord component.- Returns:
- the value of the
correctedPricerecord component
-
correctedSize
@SerializedName("cs") public long correctedSize()Returns the value of thecorrectedSizerecord component.- Returns:
- the value of the
correctedSizerecord component
-
correctedConditions
Returns the value of thecorrectedConditionsrecord component.- Returns:
- the value of the
correctedConditionsrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
tape
Returns the value of thetaperecord component.- Returns:
- the value of the
taperecord component
-