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:
  • Field Details

  • Constructor Details

    • OrderLeg

      public OrderLeg()
  • Method Details

    • assetClass

      public OrderLeg assetClass(@Nullable AssetClass assetClass)
    • getAssetClass

      @Nullable public AssetClass getAssetClass()
      Get assetClass
      Returns:
      assetClass
    • setAssetClass

      public void setAssetClass(@Nullable AssetClass assetClass)
    • assetId

      public OrderLeg assetId(@Nullable UUID assetId)
    • getAssetId

      @Nullable public UUID getAssetId()
      Asset ID (For options this represents the option contract ID)
      Returns:
      assetId
    • setAssetId

      public void setAssetId(@Nullable UUID assetId)
    • canceledAt

      public OrderLeg canceledAt(@Nullable OffsetDateTime canceledAt)
    • getCanceledAt

      @Nullable public OffsetDateTime getCanceledAt()
      Get canceledAt
      Returns:
      canceledAt
    • setCanceledAt

      public void setCanceledAt(@Nullable OffsetDateTime canceledAt)
    • clientOrderId

      public OrderLeg clientOrderId(@Nullable String clientOrderId)
    • getClientOrderId

      @Nullable public String getClientOrderId()
      Client unique order ID
      Returns:
      clientOrderId
    • setClientOrderId

      public void setClientOrderId(@Nullable String clientOrderId)
    • createdAt

      public OrderLeg createdAt(@Nullable OffsetDateTime createdAt)
    • getCreatedAt

      @Nullable public OffsetDateTime getCreatedAt()
      Get createdAt
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nullable OffsetDateTime createdAt)
    • expiredAt

      public OrderLeg expiredAt(@Nullable OffsetDateTime expiredAt)
    • getExpiredAt

      @Nullable public OffsetDateTime getExpiredAt()
      Get expiredAt
      Returns:
      expiredAt
    • setExpiredAt

      public void setExpiredAt(@Nullable OffsetDateTime expiredAt)
    • extendedHours

      public OrderLeg extendedHours(@Nullable Boolean extendedHours)
    • getExtendedHours

      @Nullable public Boolean getExtendedHours()
      If true, eligible for execution outside regular trading hours.
      Returns:
      extendedHours
    • setExtendedHours

      public void setExtendedHours(@Nullable Boolean extendedHours)
    • failedAt

      public OrderLeg failedAt(@Nullable OffsetDateTime failedAt)
    • getFailedAt

      @Nullable public OffsetDateTime getFailedAt()
      Get failedAt
      Returns:
      failedAt
    • setFailedAt

      public void setFailedAt(@Nullable OffsetDateTime failedAt)
    • filledAt

      public OrderLeg filledAt(@Nullable OffsetDateTime filledAt)
    • getFilledAt

      @Nullable public OffsetDateTime getFilledAt()
      Get filledAt
      Returns:
      filledAt
    • setFilledAt

      public void setFilledAt(@Nullable OffsetDateTime filledAt)
    • filledAvgPrice

      public OrderLeg filledAvgPrice(@Nullable String filledAvgPrice)
    • getFilledAvgPrice

      @Nullable public String getFilledAvgPrice()
      Filled average price
      Returns:
      filledAvgPrice
    • setFilledAvgPrice

      public void setFilledAvgPrice(@Nullable String filledAvgPrice)
    • filledQty

      public OrderLeg filledQty(@Nullable String filledQty)
    • getFilledQty

      @Nullable public String getFilledQty()
      Filled quantity
      Returns:
      filledQty
    • setFilledQty

      public void setFilledQty(@Nullable String filledQty)
    • hwm

      public OrderLeg hwm(@Nullable String hwm)
    • getHwm

      @Nullable public String getHwm()
      The highest (lowest) market price seen since the trailing stop order was submitted.
      Returns:
      hwm
    • setHwm

      public void setHwm(@Nullable String hwm)
    • id

      public OrderLeg id(@Nullable UUID id)
    • getId

      @Nullable public UUID getId()
      Order ID
      Returns:
      id
    • setId

      public void setId(@Nullable UUID id)
    • legs

      public OrderLeg legs(@Nullable List<Object> legs)
    • addLegsItem

      public OrderLeg addLegsItem(Object legsItem)
    • getLegs

      @Nullable public List<Object> getLegs()
      Always null for an order leg; legs are not nested beyond one level.
      Returns:
      legs
    • setLegs

      public void setLegs(@Nullable List<Object> legs)
    • limitPrice

      public OrderLeg limitPrice(@Nullable String limitPrice)
    • getLimitPrice

      @Nullable public String getLimitPrice()
      Limit price
      Returns:
      limitPrice
    • setLimitPrice

      public void setLimitPrice(@Nullable String limitPrice)
    • notional

      public OrderLeg notional(@Nullable String notional)
    • getNotional

      @Nullable public String getNotional()
      Ordered notional amount. If entered, qty will be null. Can take up to 9 decimal points.
      Returns:
      notional
    • setNotional

      public void setNotional(@Nullable String notional)
    • orderClass

      public OrderLeg orderClass(@Nullable OrderClass orderClass)
    • getOrderClass

      @Nullable public OrderClass getOrderClass()
      Get orderClass
      Returns:
      orderClass
    • setOrderClass

      public void setOrderClass(@Nullable OrderClass orderClass)
    • orderType

      @Deprecated public OrderLeg orderType(@Nullable String orderType)
      Deprecated.
    • getOrderType

      @Deprecated @Nullable public String getOrderType()
      Deprecated.
      Deprecated in favour of the field \"type\"
      Returns:
      orderType
    • setOrderType

      @Deprecated public void setOrderType(@Nullable String orderType)
      Deprecated.
    • positionIntent

      public OrderLeg positionIntent(@Nullable PositionIntent positionIntent)
    • getPositionIntent

      @Nullable public PositionIntent getPositionIntent()
      Get positionIntent
      Returns:
      positionIntent
    • setPositionIntent

      public void setPositionIntent(@Nullable PositionIntent positionIntent)
    • qty

      public OrderLeg qty(@Nullable String qty)
    • getQty

      @Nullable public String getQty()
      Ordered quantity. If entered, notional will be null. Can take up to 9 decimal points.
      Returns:
      qty
    • setQty

      public void setQty(@Nullable String qty)
    • replacedAt

      public OrderLeg replacedAt(@Nullable OffsetDateTime replacedAt)
    • getReplacedAt

      @Nullable public OffsetDateTime getReplacedAt()
      Get replacedAt
      Returns:
      replacedAt
    • setReplacedAt

      public void setReplacedAt(@Nullable OffsetDateTime replacedAt)
    • replacedBy

      public OrderLeg replacedBy(@Nullable UUID replacedBy)
    • getReplacedBy

      @Nullable public UUID getReplacedBy()
      The order ID that this order was replaced by
      Returns:
      replacedBy
    • setReplacedBy

      public void setReplacedBy(@Nullable UUID replacedBy)
    • replaces

      public OrderLeg replaces(@Nullable UUID replaces)
    • getReplaces

      @Nullable public UUID getReplaces()
      The order ID that this order replaces
      Returns:
      replaces
    • setReplaces

      public void setReplaces(@Nullable UUID replaces)
    • side

      public OrderLeg side(@Nonnull OrderSide side)
    • getSide

      @Nonnull public OrderSide getSide()
      Get side
      Returns:
      side
    • setSide

      public void setSide(@Nonnull OrderSide side)
    • status

      public OrderLeg status(@Nullable OrderStatus status)
    • getStatus

      @Nullable public OrderStatus getStatus()
      Get status
      Returns:
      status
    • setStatus

      public void setStatus(@Nullable OrderStatus status)
    • stopPrice

      public OrderLeg stopPrice(@Nullable String stopPrice)
    • getStopPrice

      @Nullable public String getStopPrice()
      Stop price
      Returns:
      stopPrice
    • setStopPrice

      public void setStopPrice(@Nullable String stopPrice)
    • submittedAt

      public OrderLeg submittedAt(@Nullable OffsetDateTime submittedAt)
    • getSubmittedAt

      @Nullable public OffsetDateTime getSubmittedAt()
      Get submittedAt
      Returns:
      submittedAt
    • setSubmittedAt

      public void setSubmittedAt(@Nullable OffsetDateTime submittedAt)
    • symbol

      public OrderLeg symbol(@Nonnull String symbol)
    • getSymbol

      @Nonnull public String getSymbol()
      Asset symbol
      Returns:
      symbol
    • setSymbol

      public void setSymbol(@Nonnull String symbol)
    • timeInForce

      public OrderLeg timeInForce(@Nonnull TimeInForce timeInForce)
    • getTimeInForce

      @Nonnull public TimeInForce getTimeInForce()
      Get timeInForce
      Returns:
      timeInForce
    • setTimeInForce

      public void setTimeInForce(@Nonnull TimeInForce timeInForce)
    • trailPercent

      public OrderLeg trailPercent(@Nullable String trailPercent)
    • getTrailPercent

      @Nullable public String getTrailPercent()
      The percent value away from the high water mark for trailing stop orders.
      Returns:
      trailPercent
    • setTrailPercent

      public void setTrailPercent(@Nullable String trailPercent)
    • trailPrice

      public OrderLeg trailPrice(@Nullable String trailPrice)
    • getTrailPrice

      @Nullable public String getTrailPrice()
      The dollar value away from the high water mark for trailing stop orders.
      Returns:
      trailPrice
    • setTrailPrice

      public void setTrailPrice(@Nullable String trailPrice)
    • type

      public OrderLeg type(@Nonnull OrderType type)
    • getType

      @Nonnull public OrderType getType()
      Get type
      Returns:
      type
    • setType

      public void setType(@Nonnull OrderType type)
    • updatedAt

      public OrderLeg updatedAt(@Nullable OffsetDateTime updatedAt)
    • getUpdatedAt

      @Nullable public OffsetDateTime getUpdatedAt()
      Get updatedAt
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(@Nullable OffsetDateTime updatedAt)
    • putAdditionalProperty

      public OrderLeg putAdditionalProperty(String key, Object value)
      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 property
      value - value of the property
      Returns:
      the OrderLeg instance itself
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      a map of objects
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - name of the property
      Returns:
      an object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      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

      public static OrderLeg fromJson(String jsonString) throws IOException
      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

      public String toJson()
      Convert an instance of OrderLeg to an JSON string
      Returns:
      JSON string