Package markets.alpaca.client.ws.model
Record Class StockTrade
java.lang.Object
java.lang.Record
markets.alpaca.client.ws.model.StockTrade
- Record Components:
symbol- ticker symboltradeId- exchange-assigned trade IDexchange- exchange code where the trade occurredprice- trade pricesize- trade size in sharesconditions- trade condition codes (may be null or empty)timestamp- RFC-3339 timestamp with nanosecond precisiontape- consolidated tape identifier (A,B, orC)
public record StockTrade(String symbol, long tradeId, String exchange, BigDecimal price, long size, List<String> conditions, String timestamp, String tape)
extends Record
A stock trade execution event (
T: "t").-
Constructor Summary
ConstructorsConstructorDescriptionStockTrade(String symbol, long tradeId, String exchange, BigDecimal price, long size, List<String> conditions, String timestamp, String tape) Creates an instance of aStockTraderecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionsrecord 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
-
StockTrade
public StockTrade(String symbol, long tradeId, String exchange, BigDecimal price, long size, List<String> conditions, String timestamp, String tape) Creates an instance of aStockTraderecord 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 componentconditions- the value for theconditionsrecord 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
-
conditions
Returns the value of theconditionsrecord component.- Returns:
- the value of the
conditionsrecord 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
-