Class PatchOrderRequest
java.lang.Object
markets.alpaca.client.openapi.trading.model.PatchOrderRequest
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class PatchOrderRequest
extends Object
implements Serializable
Represents a request to patch an 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 PatchOrderRequestCreate an instance of PatchOrderRequest 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()number of shares to trade.required if original order type is limit or stop_limitGet timeInForcegetTrail()the new value of the trail_price or trail_percent value (works only for type=\"trailing_stop\")inthashCode()limitPrice(String limitPrice) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.voidsetAdvancedInstructions(AdvancedInstructions advancedInstructions) voidsetClientOrderId(String clientOrderId) voidsetLimitPrice(String limitPrice) voidsetNotional(String notional) voidvoidsetStopPrice(String stopPrice) voidsetTimeInForce(TimeInForce timeInForce) voidtimeInForce(TimeInForce timeInForce) toJson()Convert an instance of PatchOrderRequest 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_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
-
PatchOrderRequest
public PatchOrderRequest()
-
-
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
number of shares to trade. 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.- Returns:
- qty
-
setQty
-
stopPrice
-
getStopPrice
required if original order type is limit 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 value (works only for type=\"trailing_stop\")- 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 PatchOrderRequest 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 PatchOrderRequest
-
fromJson
Create an instance of PatchOrderRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PatchOrderRequest
- Throws:
IOException- if the JSON string is invalid with respect to PatchOrderRequest
-
toJson
Convert an instance of PatchOrderRequest to an JSON string- Returns:
- JSON string
-