Class MLegOrderLeg
java.lang.Object
markets.alpaca.client.openapi.trading.model.MLegOrderLeg
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class MLegOrderLeg
extends Object
implements Serializable
Represents an individual leg of a multi-leg options order.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic MLegOrderLegCreate an instance of MLegOrderLeg given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Get positionIntentproportional quantity of this leg in relation to the overall multi-leg order qtygetSide()Get sidesymbol or asset ID to identify the asset to tradeinthashCode()positionIntent(PositionIntent positionIntent) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.voidsetPositionIntent(PositionIntent positionIntent) voidsetRatioQty(String ratioQty) voidvoidtoJson()Convert an instance of MLegOrderLeg to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_POSITION_INTENT
- See Also:
-
SERIALIZED_NAME_RATIO_QTY
- See Also:
-
SERIALIZED_NAME_SIDE
- See Also:
-
SERIALIZED_NAME_SYMBOL
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
MLegOrderLeg
public MLegOrderLeg()
-
-
Method Details
-
positionIntent
-
getPositionIntent
Get positionIntent- Returns:
- positionIntent
-
setPositionIntent
-
ratioQty
-
getRatioQty
proportional quantity of this leg in relation to the overall multi-leg order qty- Returns:
- ratioQty
-
setRatioQty
-
side
-
getSide
Get side- Returns:
- side
-
setSide
-
symbol
-
getSymbol
symbol or asset ID to identify the asset to trade- Returns:
- symbol
-
setSymbol
-
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 MLegOrderLeg 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 MLegOrderLeg
-
fromJson
Create an instance of MLegOrderLeg given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of MLegOrderLeg
- Throws:
IOException- if the JSON string is invalid with respect to MLegOrderLeg
-
toJson
Convert an instance of MLegOrderLeg to an JSON string- Returns:
- JSON string
-