Package markets.alpaca.client.ws.model
Record Class Order
java.lang.Object
java.lang.Record
markets.alpaca.client.ws.model.Order
public record Order(String id, String clientOrderId, String assetId, String assetClass, String symbol, String side, String type, String orderType, String orderClass, String qty, String notional, String filledQty, String filledAvgPrice, String status, String timeInForce, String limitPrice, String stopPrice, String trailPrice, String trailPercent, String hwm, boolean extendedHours, List<Order> legs, String replaces, String replacedBy, String createdAt, String submittedAt, String filledAt, String canceledAt, String expiredAt, String replacedAt, String failedAt, String cancelRequestedAt, String updatedAt)
extends Record
An order entity as returned within trade update events.
All monetary values are represented as strings by the Alpaca API to avoid floating-point
precision issues. Parse them with BigDecimal.
-
Constructor Summary
ConstructorsConstructorDescriptionOrder(String id, String clientOrderId, String assetId, String assetClass, String symbol, String side, String type, String orderType, String orderClass, String qty, String notional, String filledQty, String filledAvgPrice, String status, String timeInForce, String limitPrice, String stopPrice, String trailPrice, String trailPercent, String hwm, boolean extendedHours, List<Order> legs, String replaces, String replacedBy, String createdAt, String submittedAt, String filledAt, String canceledAt, String expiredAt, String replacedAt, String failedAt, String cancelRequestedAt, String updatedAt) Creates an instance of aOrderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassetClassrecord component.assetId()Returns the value of theassetIdrecord component.Returns the value of thecanceledAtrecord component.Returns the value of thecancelRequestedAtrecord component.Returns the value of theclientOrderIdrecord component.Returns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiredAtrecord component.booleanReturns the value of theextendedHoursrecord component.failedAt()Returns the value of thefailedAtrecord component.filledAt()Returns the value of thefilledAtrecord component.Returns the value of thefilledAvgPricerecord component.Returns the value of thefilledQtyrecord component.final inthashCode()Returns a hash code value for this object.hwm()Returns the value of thehwmrecord component.id()Returns the value of theidrecord component.legs()Returns the value of thelegsrecord component.Returns the value of thelimitPricerecord component.notional()Returns the value of thenotionalrecord component.Returns the value of theorderClassrecord component.Returns the value of theorderTyperecord component.qty()Returns the value of theqtyrecord component.Returns the value of thereplacedAtrecord component.Returns the value of thereplacedByrecord component.replaces()Returns the value of thereplacesrecord component.side()Returns the value of thesiderecord component.status()Returns the value of thestatusrecord component.Returns the value of thestopPricerecord component.Returns the value of thesubmittedAtrecord component.symbol()Returns the value of thesymbolrecord component.Returns the value of thetimeInForcerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetrailPercentrecord component.Returns the value of thetrailPricerecord component.type()Returns the value of thetyperecord component.Returns the value of theupdatedAtrecord component.
-
Constructor Details
-
Order
public Order(String id, String clientOrderId, String assetId, String assetClass, String symbol, String side, String type, String orderType, String orderClass, String qty, String notional, String filledQty, String filledAvgPrice, String status, String timeInForce, String limitPrice, String stopPrice, String trailPrice, String trailPercent, String hwm, boolean extendedHours, List<Order> legs, String replaces, String replacedBy, String createdAt, String submittedAt, String filledAt, String canceledAt, String expiredAt, String replacedAt, String failedAt, String cancelRequestedAt, String updatedAt) Creates an instance of aOrderrecord class.- Parameters:
id- the value for theidrecord componentclientOrderId- the value for theclientOrderIdrecord componentassetId- the value for theassetIdrecord componentassetClass- the value for theassetClassrecord componentsymbol- the value for thesymbolrecord componentside- the value for thesiderecord componenttype- the value for thetyperecord componentorderType- the value for theorderTyperecord componentorderClass- the value for theorderClassrecord componentqty- the value for theqtyrecord componentnotional- the value for thenotionalrecord componentfilledQty- the value for thefilledQtyrecord componentfilledAvgPrice- the value for thefilledAvgPricerecord componentstatus- the value for thestatusrecord componenttimeInForce- the value for thetimeInForcerecord componentlimitPrice- the value for thelimitPricerecord componentstopPrice- the value for thestopPricerecord componenttrailPrice- the value for thetrailPricerecord componenttrailPercent- the value for thetrailPercentrecord componenthwm- the value for thehwmrecord componentextendedHours- the value for theextendedHoursrecord componentlegs- the value for thelegsrecord componentreplaces- the value for thereplacesrecord componentreplacedBy- the value for thereplacedByrecord componentcreatedAt- the value for thecreatedAtrecord componentsubmittedAt- the value for thesubmittedAtrecord componentfilledAt- the value for thefilledAtrecord componentcanceledAt- the value for thecanceledAtrecord componentexpiredAt- the value for theexpiredAtrecord componentreplacedAt- the value for thereplacedAtrecord componentfailedAt- the value for thefailedAtrecord componentcancelRequestedAt- the value for thecancelRequestedAtrecord componentupdatedAt- the value for theupdatedAtrecord 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
clientOrderId
Returns the value of theclientOrderIdrecord component.- Returns:
- the value of the
clientOrderIdrecord component
-
assetId
Returns the value of theassetIdrecord component.- Returns:
- the value of the
assetIdrecord component
-
assetClass
Returns the value of theassetClassrecord component.- Returns:
- the value of the
assetClassrecord component
-
symbol
Returns the value of thesymbolrecord component.- Returns:
- the value of the
symbolrecord component
-
side
Returns the value of thesiderecord component.- Returns:
- the value of the
siderecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
orderType
Returns the value of theorderTyperecord component.- Returns:
- the value of the
orderTyperecord component
-
orderClass
Returns the value of theorderClassrecord component.- Returns:
- the value of the
orderClassrecord component
-
qty
Returns the value of theqtyrecord component.- Returns:
- the value of the
qtyrecord component
-
notional
Returns the value of thenotionalrecord component.- Returns:
- the value of the
notionalrecord component
-
filledQty
Returns the value of thefilledQtyrecord component.- Returns:
- the value of the
filledQtyrecord component
-
filledAvgPrice
Returns the value of thefilledAvgPricerecord component.- Returns:
- the value of the
filledAvgPricerecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
timeInForce
Returns the value of thetimeInForcerecord component.- Returns:
- the value of the
timeInForcerecord component
-
limitPrice
Returns the value of thelimitPricerecord component.- Returns:
- the value of the
limitPricerecord component
-
stopPrice
Returns the value of thestopPricerecord component.- Returns:
- the value of the
stopPricerecord component
-
trailPrice
Returns the value of thetrailPricerecord component.- Returns:
- the value of the
trailPricerecord component
-
trailPercent
Returns the value of thetrailPercentrecord component.- Returns:
- the value of the
trailPercentrecord component
-
hwm
Returns the value of thehwmrecord component.- Returns:
- the value of the
hwmrecord component
-
extendedHours
@SerializedName("extended_hours") public boolean extendedHours()Returns the value of theextendedHoursrecord component.- Returns:
- the value of the
extendedHoursrecord component
-
legs
Returns the value of thelegsrecord component.- Returns:
- the value of the
legsrecord component
-
replaces
Returns the value of thereplacesrecord component.- Returns:
- the value of the
replacesrecord component
-
replacedBy
Returns the value of thereplacedByrecord component.- Returns:
- the value of the
replacedByrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
submittedAt
Returns the value of thesubmittedAtrecord component.- Returns:
- the value of the
submittedAtrecord component
-
filledAt
Returns the value of thefilledAtrecord component.- Returns:
- the value of the
filledAtrecord component
-
canceledAt
Returns the value of thecanceledAtrecord component.- Returns:
- the value of the
canceledAtrecord component
-
expiredAt
Returns the value of theexpiredAtrecord component.- Returns:
- the value of the
expiredAtrecord component
-
replacedAt
Returns the value of thereplacedAtrecord component.- Returns:
- the value of the
replacedAtrecord component
-
failedAt
Returns the value of thefailedAtrecord component.- Returns:
- the value of the
failedAtrecord component
-
cancelRequestedAt
Returns the value of thecancelRequestedAtrecord component.- Returns:
- the value of the
cancelRequestedAtrecord component
-
updatedAt
Returns the value of theupdatedAtrecord component.- Returns:
- the value of the
updatedAtrecord component
-