Class OrderLeg
java.lang.Object
markets.alpaca.client.openapi.trading.model.OrderLeg
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class OrderLeg
extends Object
implements Serializable
This is copy of Order response schemas as a workaround of displaying issue of nested Order recursively for legs
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLegsItem(Object legsItem) assetClass(AssetClass assetClass) canceledAt(OffsetDateTime canceledAt) clientOrderId(String clientOrderId) createdAt(OffsetDateTime createdAt) booleanexpiredAt(OffsetDateTime expiredAt) extendedHours(Boolean extendedHours) failedAt(OffsetDateTime failedAt) filledAt(OffsetDateTime filledAt) filledAvgPrice(String filledAvgPrice) static OrderLegCreate an instance of OrderLeg given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Get assetClassAsset ID (For options this represents the option contract ID)Get canceledAtClient unique order IDGet createdAtGet expiredAtIf true, eligible for execution outside regular trading hours.Get failedAtGet filledAtFilled average priceFilled quantitygetHwm()The highest (lowest) market price seen since the trailing stop order was submitted.getId()Order IDgetLegs()Always null for an order leg; legs are not nested beyond one level.Limit priceOrdered notional amount.Get orderClassDeprecated.Get positionIntentgetQty()Ordered quantity.Get replacedAtThe order ID that this order was replaced byThe order ID that this order replacesgetSide()Get sideGet statusStop priceGet submittedAtAsset symbolGet timeInForceThe percent value away from the high water mark for trailing stop orders.The dollar value away from the high water mark for trailing stop orders.getType()Get typeGet updatedAtinthashCode()limitPrice(String limitPrice) orderClass(OrderClass orderClass) Deprecated.positionIntent(PositionIntent positionIntent) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.replacedAt(OffsetDateTime replacedAt) replacedBy(UUID replacedBy) voidsetAssetClass(AssetClass assetClass) voidsetAssetId(UUID assetId) voidsetCanceledAt(OffsetDateTime canceledAt) voidsetClientOrderId(String clientOrderId) voidsetCreatedAt(OffsetDateTime createdAt) voidsetExpiredAt(OffsetDateTime expiredAt) voidsetExtendedHours(Boolean extendedHours) voidsetFailedAt(OffsetDateTime failedAt) voidsetFilledAt(OffsetDateTime filledAt) voidsetFilledAvgPrice(String filledAvgPrice) voidsetFilledQty(String filledQty) voidvoidvoidvoidsetLimitPrice(String limitPrice) voidsetNotional(String notional) voidsetOrderClass(OrderClass orderClass) voidsetOrderType(String orderType) Deprecated.voidsetPositionIntent(PositionIntent positionIntent) voidvoidsetReplacedAt(OffsetDateTime replacedAt) voidsetReplacedBy(UUID replacedBy) voidsetReplaces(UUID replaces) voidvoidsetStatus(OrderStatus status) voidsetStopPrice(String stopPrice) voidsetSubmittedAt(OffsetDateTime submittedAt) voidvoidsetTimeInForce(TimeInForce timeInForce) voidsetTrailPercent(String trailPercent) voidsetTrailPrice(String trailPrice) voidvoidsetUpdatedAt(OffsetDateTime updatedAt) status(OrderStatus status) submittedAt(OffsetDateTime submittedAt) timeInForce(TimeInForce timeInForce) toJson()Convert an instance of OrderLeg to an JSON stringtoString()trailPercent(String trailPercent) trailPrice(String trailPrice) updatedAt(OffsetDateTime updatedAt) static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ASSET_CLASS
- See Also:
-
SERIALIZED_NAME_ASSET_ID
- See Also:
-
SERIALIZED_NAME_CANCELED_AT
- See Also:
-
SERIALIZED_NAME_CLIENT_ORDER_ID
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_EXPIRED_AT
- See Also:
-
SERIALIZED_NAME_EXTENDED_HOURS
- See Also:
-
SERIALIZED_NAME_FAILED_AT
- See Also:
-
SERIALIZED_NAME_FILLED_AT
- See Also:
-
SERIALIZED_NAME_FILLED_AVG_PRICE
- See Also:
-
SERIALIZED_NAME_FILLED_QTY
- See Also:
-
SERIALIZED_NAME_HWM
- See Also:
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_LEGS
- See Also:
-
SERIALIZED_NAME_LIMIT_PRICE
- See Also:
-
SERIALIZED_NAME_NOTIONAL
- See Also:
-
SERIALIZED_NAME_ORDER_CLASS
- See Also:
-
SERIALIZED_NAME_ORDER_TYPE
- See Also:
-
SERIALIZED_NAME_POSITION_INTENT
- See Also:
-
SERIALIZED_NAME_QTY
- See Also:
-
SERIALIZED_NAME_REPLACED_AT
- See Also:
-
SERIALIZED_NAME_REPLACED_BY
- See Also:
-
SERIALIZED_NAME_REPLACES
- See Also:
-
SERIALIZED_NAME_SIDE
- See Also:
-
SERIALIZED_NAME_STATUS
- See Also:
-
SERIALIZED_NAME_STOP_PRICE
- See Also:
-
SERIALIZED_NAME_SUBMITTED_AT
- See Also:
-
SERIALIZED_NAME_SYMBOL
- See Also:
-
SERIALIZED_NAME_TIME_IN_FORCE
- See Also:
-
SERIALIZED_NAME_TRAIL_PERCENT
- See Also:
-
SERIALIZED_NAME_TRAIL_PRICE
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_UPDATED_AT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
OrderLeg
public OrderLeg()
-
-
Method Details
-
assetClass
-
getAssetClass
Get assetClass- Returns:
- assetClass
-
setAssetClass
-
assetId
-
getAssetId
Asset ID (For options this represents the option contract ID)- Returns:
- assetId
-
setAssetId
-
canceledAt
-
getCanceledAt
Get canceledAt- Returns:
- canceledAt
-
setCanceledAt
-
clientOrderId
-
getClientOrderId
Client unique order ID- Returns:
- clientOrderId
-
setClientOrderId
-
createdAt
-
getCreatedAt
Get createdAt- Returns:
- createdAt
-
setCreatedAt
-
expiredAt
-
getExpiredAt
Get expiredAt- Returns:
- expiredAt
-
setExpiredAt
-
extendedHours
-
getExtendedHours
If true, eligible for execution outside regular trading hours.- Returns:
- extendedHours
-
setExtendedHours
-
failedAt
-
getFailedAt
Get failedAt- Returns:
- failedAt
-
setFailedAt
-
filledAt
-
getFilledAt
Get filledAt- Returns:
- filledAt
-
setFilledAt
-
filledAvgPrice
-
getFilledAvgPrice
Filled average price- Returns:
- filledAvgPrice
-
setFilledAvgPrice
-
filledQty
-
getFilledQty
Filled quantity- Returns:
- filledQty
-
setFilledQty
-
hwm
-
getHwm
The highest (lowest) market price seen since the trailing stop order was submitted.- Returns:
- hwm
-
setHwm
-
id
-
getId
Order ID- Returns:
- id
-
setId
-
legs
-
addLegsItem
-
getLegs
Always null for an order leg; legs are not nested beyond one level.- Returns:
- legs
-
setLegs
-
limitPrice
-
getLimitPrice
Limit price- Returns:
- limitPrice
-
setLimitPrice
-
notional
-
getNotional
Ordered notional amount. If entered, qty will be null. Can take up to 9 decimal points.- Returns:
- notional
-
setNotional
-
orderClass
-
getOrderClass
Get orderClass- Returns:
- orderClass
-
setOrderClass
-
orderType
Deprecated. -
getOrderType
Deprecated.Deprecated in favour of the field \"type\"- Returns:
- orderType
-
setOrderType
Deprecated. -
positionIntent
-
getPositionIntent
Get positionIntent- Returns:
- positionIntent
-
setPositionIntent
-
qty
-
getQty
Ordered quantity. If entered, notional will be null. Can take up to 9 decimal points.- Returns:
- qty
-
setQty
-
replacedAt
-
getReplacedAt
Get replacedAt- Returns:
- replacedAt
-
setReplacedAt
-
replacedBy
-
getReplacedBy
The order ID that this order was replaced by- Returns:
- replacedBy
-
setReplacedBy
-
replaces
-
getReplaces
The order ID that this order replaces- Returns:
- replaces
-
setReplaces
-
side
-
getSide
Get side- Returns:
- side
-
setSide
-
status
-
getStatus
Get status- Returns:
- status
-
setStatus
-
stopPrice
-
getStopPrice
Stop price- Returns:
- stopPrice
-
setStopPrice
-
submittedAt
-
getSubmittedAt
Get submittedAt- Returns:
- submittedAt
-
setSubmittedAt
-
symbol
-
getSymbol
Asset symbol- Returns:
- symbol
-
setSymbol
-
timeInForce
-
getTimeInForce
Get timeInForce- Returns:
- timeInForce
-
setTimeInForce
-
trailPercent
-
getTrailPercent
The percent value away from the high water mark for trailing stop orders.- Returns:
- trailPercent
-
setTrailPercent
-
trailPrice
-
getTrailPrice
The dollar value away from the high water mark for trailing stop orders.- Returns:
- trailPrice
-
setTrailPrice
-
type
-
getType
Get type- Returns:
- type
-
setType
-
updatedAt
-
getUpdatedAt
Get updatedAt- Returns:
- updatedAt
-
setUpdatedAt
-
putAdditionalProperty
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key- name of the propertyvalue- value of the property- Returns:
- the OrderLeg instance itself
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to OrderLeg
-
fromJson
Create an instance of OrderLeg given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of OrderLeg
- Throws:
IOException- if the JSON string is invalid with respect to OrderLeg
-
toJson
Convert an instance of OrderLeg to an JSON string- Returns:
- JSON string
-