Package markets.alpaca.client.ws.model
Record Class CryptoOrderbook
java.lang.Object
java.lang.Record
markets.alpaca.client.ws.model.CryptoOrderbook
- Record Components:
symbol- crypto pair symbol (e.g."BTC/USD")timestamp- RFC-3339 timestamp with nanosecond precisionbids- bid price levelsasks- ask price levelsreset-truefor a full snapshot,falsefor an incremental update
public record CryptoOrderbook(String symbol, String timestamp, List<CryptoOrderbookLevel> bids, List<CryptoOrderbookLevel> asks, boolean reset)
extends Record
A full or incremental order book snapshot for a crypto pair (
T: "o").
When reset is true this is a full order-book snapshot (all levels). When
false only the changed levels are included and should be merged into the locally
maintained book.
-
Constructor Summary
ConstructorsConstructorDescriptionCryptoOrderbook(String symbol, String timestamp, List<CryptoOrderbookLevel> bids, List<CryptoOrderbookLevel> asks, boolean reset) Creates an instance of aCryptoOrderbookrecord class. -
Method Summary
Modifier and TypeMethodDescriptionasks()Returns the value of theasksrecord component.bids()Returns the value of thebidsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanreset()Returns the value of theresetrecord component.symbol()Returns the value of thesymbolrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CryptoOrderbook
public CryptoOrderbook(String symbol, String timestamp, List<CryptoOrderbookLevel> bids, List<CryptoOrderbookLevel> asks, boolean reset) Creates an instance of aCryptoOrderbookrecord class.
-
-
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
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
bids
Returns the value of thebidsrecord component.- Returns:
- the value of the
bidsrecord component
-
asks
Returns the value of theasksrecord component.- Returns:
- the value of the
asksrecord component
-
reset
@SerializedName("r") public boolean reset()Returns the value of theresetrecord component.- Returns:
- the value of the
resetrecord component
-