Package markets.alpaca.client.ws.model
Record Class TradeCancelError
java.lang.Object
java.lang.Record
markets.alpaca.client.ws.model.TradeCancelError
- Record Components:
symbol- ticker symboltradeId- trade IDexchange- exchange codeprice- trade pricesize- trade sizeaction-"C"for cancel,"E"for errortimestamp- RFC-3339 timestamptape- 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 Summary
ConstructorsConstructorDescriptionTradeCancelError(String symbol, long tradeId, String exchange, BigDecimal price, long size, String action, String timestamp, String tape) Creates an instance of aTradeCancelErrorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord 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.price()Returns the value of thepricerecord component.longsize()Returns the value of thesizerecord 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.longtradeId()Returns the value of thetradeIdrecord component.
-
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 aTradeCancelErrorrecord class.- Parameters:
symbol- the value for thesymbolrecord componenttradeId- the value for thetradeIdrecord componentexchange- the value for theexchangerecord componentprice- the value for thepricerecord componentsize- the value for thesizerecord componentaction- the value for theactionrecord 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
-
tradeId
@SerializedName("i") public long tradeId()Returns the value of thetradeIdrecord component.- Returns:
- the value of the
tradeIdrecord component
-
exchange
Returns the value of theexchangerecord component.- Returns:
- the value of the
exchangerecord component
-
price
Returns the value of thepricerecord component.- Returns:
- the value of the
pricerecord component
-
size
@SerializedName("s") public long size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord 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
-