Update Option Order
Update a Single Non-Discretionary, Single CAT, Single Complex, Block or Allocation Option Order.
POST
/trading-api/v1/optionorder/update-option-order
Request
Query Parameters
Name | Data Type | Description |
---|---|---|
verifyOnly | Boolean | True: does not submit order. Response body will not return an orderId <br/> False: immediately submits order through API. If the order is successfully, the Response Body will return an orderId` |
Request Body
The Request Body to update an Options Order includes several required fields. This ensures that the created order has all necessary parameters for the order to return with no errors.
All fields in the request, other than the orderId
field, can be updated. If the field is not being updated, the Update field must reflect that of the inputted field from the original orderId
.
This request must consist of the below Stonex identifiers:
- Schema
- Example
Attributes | Data Type | Length | Description |
---|---|---|---|
orderId | String | 32 | Assigned Order identifier |
quantity | Number | New quantity amount | |
stopPrice | Number | Price assigned to trigger a Stop Order | |
limitPrice | Number | Price assigned to a Limit order | |
timeInForce | String | Day, GoodTillCancel, GTXPre |
{
"orderId": "00000000-0000-0000-0000-000000000000",
"quantity": 0,
"stopPrice": 0,
"limitPrice": 0,
"timeInForce": "Day"
}
Response Body
Responses from the request will return with a Status Code. There are 3 Codes: Successful (200), Bad Request (400) and Internal Server Error (500).
Successful Response
The response for a Successful request will look like:
- Schema
- Example
Attributes | Data Type | Length | Description |
---|---|---|---|
statusCode | Integer | 3 | Code identifies success of request |
message | String | Outcome of request | |
data | Data Block | Main field containing information of request | |
errors | Errors | API errors | |
traceId | String | Unique identifier | |
hasErrors | Boolean | True or False |
{
"statusCode": 200,
"message": "string",
"data": {
"orderId": "00000000-0000-0000-0000-000000000000",
"orderNumber": "00000000",
"orderType": "Single",
"accountType": "Cash",
"action": "BuyToOpen",
"timeInForce": "Day",
"orderStatus": "Verification",
"securityIdentifier": {
"securityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"securityNumber": "string",
"sourceSystem": "string",
"symbol": "string",
"underlyingSymbol": "string",
"isin": "string",
"sedol": "string",
"cusip": "string",
"description": "string",
"strikePrice": 0,
"expirationDate": "2024-05-13T14:01:34.343Z",
"displaySymbol": "string"
},
"openCloseIndicator": "Open",
"quantity": 0,
"filledQuantity": 0,
"solicited": false,
"notHeld": false,
"tradeInfo": {
"buyingPower": 0,
"estimatedSettlementDate": "2024-05-13T14:01:34.343Z",
"estimatedPrincipal": 0,
"estimatedNetTotal": 0,
"estimatedCommission": 0,
"estimatedHandlingFee": 0,
"estimatedPostageFee": 0,
"estimatedSecFee": 0,
"estimatedFirmFee": 0,
"estimatedPrice": 0,
"actualPrincipal": 0,
"actualNetTotal": 0,
"actualCommission": 0,
"actualHandlingFee": 0,
"actualPostageFee": 0,
"actualSecFee": 0,
"actualPrice": 0
},
"averageTradePriceAmount": 0,
"orderWarnings": [
"string"
],
"orderError": {
"code": "string",
"target": "string",
"message": "string",
"details": [
"string"
]
},
"enteredDate": "2024-05-13T14:01:34.343Z",
"completedDate": "2024-05-13T14:01:34.343Z"
},
"errors": [
{
"code": "string",
"field": "string",
"reason": "string"
}
],
"traceId": "string",
"hasErrors": true
}
</TabItem>
</Tabs>
### Bad Request or Internal Server Error
The response for a Bad Request or Internal Server Error will look like:
<Tabs>
<TabItem value="Schema" label="Schema" Default>
| Attributes | Data Type | Length | Description |
|--------------------|------------------------------------------------------------------------------------|----------|-------------------------------------|
| `statusCode` | Integer | 3 | Code identifies success of request |
| | | | Successful (200), Bad Request (400), and Internal Server Error (500) |
| `message` | String | | Outcome of request |
| `data` | [Data Block](/docs/trading-api/options/option-appendix/data-block#update-option-order) | | Main field containing information of request |
| `errors` | [Errors](/docs/trading-api/options/option-appendix/errors#errors) | | API errors |
| `traceId` | String | | Unique identifier |
| `hasErrors` | Boolean | | True or False |
</TabItem>
<TabItem value="Example" label="Example" >
```json
{
"detail": "string",
"statusCode": 400,
"message": "Request successful",
"data": "null",
"errors": [
{
"code": "BadRequest",
"field": "null",
"reason": "orderId 00000000-0000-0000-0000-000000000000 not found"
}
],
"traceId": "00-00000000000000000000000000000000-0000000000000000-00",
"hasErrors": true
}