Package markets.alpaca.client.ws.model
Record Class StockQuote
java.lang.Object
java.lang.Record
markets.alpaca.client.ws.model.StockQuote
- Record Components:
symbol- ticker symbolaskExchange- ask exchange codeaskPrice- ask priceaskSize- ask size in sharesbidExchange- bid exchange codebidPrice- bid pricebidSize- bid size in sharestradeSize- trade size (if applicable)conditions- quote condition codes (may be null or empty)timestamp- RFC-3339 timestamp with nanosecond precisiontape- consolidated tape identifier
public record StockQuote(String symbol, String askExchange, BigDecimal askPrice, long askSize, String bidExchange, BigDecimal bidPrice, long bidSize, long tradeSize, List<String> conditions, String timestamp, String tape)
extends Record
A National Best Bid and Offer (NBBO) quote update (
T: "q").-
Constructor Summary
ConstructorsConstructorDescriptionStockQuote(String symbol, String askExchange, BigDecimal askPrice, long askSize, String bidExchange, BigDecimal bidPrice, long bidSize, long tradeSize, List<String> conditions, String timestamp, String tape) Creates an instance of aStockQuoterecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaskExchangerecord component.askPrice()Returns the value of theaskPricerecord component.longaskSize()Returns the value of theaskSizerecord component.Returns the value of thebidExchangerecord component.bidPrice()Returns the value of thebidPricerecord component.longbidSize()Returns the value of thebidSizerecord component.Returns the value of theconditionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.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.longReturns the value of thetradeSizerecord component.
-
Constructor Details
-
StockQuote
public StockQuote(String symbol, String askExchange, BigDecimal askPrice, long askSize, String bidExchange, BigDecimal bidPrice, long bidSize, long tradeSize, List<String> conditions, String timestamp, String tape) Creates an instance of aStockQuoterecord class.- Parameters:
symbol- the value for thesymbolrecord componentaskExchange- the value for theaskExchangerecord componentaskPrice- the value for theaskPricerecord componentaskSize- the value for theaskSizerecord componentbidExchange- the value for thebidExchangerecord componentbidPrice- the value for thebidPricerecord componentbidSize- the value for thebidSizerecord componenttradeSize- the value for thetradeSizerecord 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
-
askExchange
Returns the value of theaskExchangerecord component.- Returns:
- the value of the
askExchangerecord component
-
askPrice
Returns the value of theaskPricerecord component.- Returns:
- the value of the
askPricerecord component
-
askSize
@SerializedName("as") public long askSize()Returns the value of theaskSizerecord component.- Returns:
- the value of the
askSizerecord component
-
bidExchange
Returns the value of thebidExchangerecord component.- Returns:
- the value of the
bidExchangerecord component
-
bidPrice
Returns the value of thebidPricerecord component.- Returns:
- the value of the
bidPricerecord component
-
bidSize
@SerializedName("bs") public long bidSize()Returns the value of thebidSizerecord component.- Returns:
- the value of the
bidSizerecord component
-
tradeSize
@SerializedName("s") public long tradeSize()Returns the value of thetradeSizerecord component.- Returns:
- the value of the
tradeSizerecord 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
-