Class UpdateOrderRequest
java.lang.Object
markets.alpaca.client.openapi.broker.model.UpdateOrderRequest
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class UpdateOrderRequest
extends Object
implements Serializable
Represents the fields that are editable in an order replace/update call. Note: client_order_id is currently not editable on its own, one of the other fields must be changed at the same time to effectively replace the order. Note: `qty` and `notional` are mutually exclusive on a single replace request. `notional` is only valid for IPO indications of interest (`asset_class: \"ipo\"`); non-IPO notional orders cannot be replaced at all.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadvancedInstructions(AdvancedInstructions advancedInstructions) clientOrderId(String clientOrderId) booleanstatic UpdateOrderRequestCreate an instance of UpdateOrderRequest given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Get advancedInstructionsA unique identifier for the new order.Required if original order's `type` field was `limit` or `stop_limit`.New notional (dollar amount) for the order.getQty()You can only patch full shares for now.Required if original order's `type` field was stop or stop_limitGet timeInForcegetTrail()The new value of the trail_price or trail_percentinthashCode()limitPrice(BigDecimal limitPrice) notional(BigDecimal notional) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.qty(BigDecimal qty) voidsetAdvancedInstructions(AdvancedInstructions advancedInstructions) voidsetClientOrderId(String clientOrderId) voidsetLimitPrice(BigDecimal limitPrice) voidsetNotional(BigDecimal notional) voidsetQty(BigDecimal qty) voidsetStopPrice(BigDecimal stopPrice) voidsetTimeInForce(TimeInForce timeInForce) voidsetTrail(BigDecimal trail) stopPrice(BigDecimal stopPrice) timeInForce(TimeInForce timeInForce) toJson()Convert an instance of UpdateOrderRequest to an JSON stringtoString()trail(BigDecimal trail) static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ADVANCED_INSTRUCTIONS
- See Also:
-
SERIALIZED_NAME_CLIENT_ORDER_ID
- See Also:
-
SERIALIZED_NAME_LIMIT_PRICE
- See Also:
-
SERIALIZED_NAME_NOTIONAL
- See Also:
-
SERIALIZED_NAME_QTY
- See Also:
-
SERIALIZED_NAME_STOP_PRICE
- See Also:
-
SERIALIZED_NAME_TIME_IN_FORCE
- See Also:
-
SERIALIZED_NAME_TRAIL
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
UpdateOrderRequest
public UpdateOrderRequest()
-
-
Method Details
-
advancedInstructions
-
getAdvancedInstructions
Get advancedInstructions- Returns:
- advancedInstructions
-
setAdvancedInstructions
-
clientOrderId
-
getClientOrderId
A unique identifier for the new order. Automatically generated if not sent. (<= 128 characters)- Returns:
- clientOrderId
-
setClientOrderId
-
limitPrice
-
getLimitPrice
Required if original order's `type` field was `limit` or `stop_limit`. In case of `mleg`, the limit_price parameter is expressed with the following notation: - A positive value indicates a debit, representing a cost or payment to be made. - A negative value signifies a credit, reflecting an amount to be received.- Returns:
- limitPrice
-
setLimitPrice
-
notional
-
getNotional
New notional (dollar amount) for the order. Only valid for IPO indications of interest (`asset_class: \"ipo\"`); will be rejected for any other asset class. Mutually exclusive with `qty` on the same replace request.- Returns:
- notional
-
setNotional
-
qty
-
getQty
You can only patch full shares for now. Qty of equity fractional orders are not allowed to change. Non-IPO notional orders cannot be replaced at all - no fields (qty, limit_price, stop_price, etc.) can be modified; cancel and resubmit instead. In case of multi-leg orders represents the number of units to trade of this strategy.- Returns:
- qty
-
setQty
-
stopPrice
-
getStopPrice
Required if original order's `type` field was stop or stop_limit- Returns:
- stopPrice
-
setStopPrice
-
timeInForce
-
getTimeInForce
Get timeInForce- Returns:
- timeInForce
-
setTimeInForce
-
trail
-
getTrail
The new value of the trail_price or trail_percent- Returns:
- trail
-
setTrail
-
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 UpdateOrderRequest 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 UpdateOrderRequest
-
fromJson
Create an instance of UpdateOrderRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of UpdateOrderRequest
- Throws:
IOException- if the JSON string is invalid with respect to UpdateOrderRequest
-
toJson
Convert an instance of UpdateOrderRequest to an JSON string- Returns:
- JSON string
-