---
spec: trading.yaml
operationId: previewOptionOrder
---

Preview an option order before submission. Returns a `confirmId` and structured confirmation details. Use this to validate the order, check for sufficient buying power, calculate fees and show the validation results to the human. The human can then decline or proceed with order placement, in this case pass `confirmId` to [Place Option Order](/docs/trading-option-orders-place) to submit. Option symbol is expected in the following format: \[Underlying symbol\]\[Expiration date YYYYMMDD\]\[C or P\]\[Strike price\]

## Code Samples

```json
{
  "contractId": "AAPL20260116C150",
  "side": "buy",
  "openClose": "open",
  "type": "limit",
  "qty": "1",
  "limitPrice": "5.00",
  "category": "option",
  "durationType": "day"
}
```

## Response Examples

```json 200
{
  "s": "ok",
  "d": {
    "confirmId": "0000001",
    "sections": [
      {
        "header": "Estimated",
        "rows": [
          {
            "label": "Estimated Cost",
            "value": "$500.00"
          }
        ],
        "warnings": [
          "A warning is some message that should be shown to the user, but not necessarily preventing from executing the order."
        ],
        "errors": [
          "The order can not be executed right now because of errors specified here."
        ]
      }
    ]
  }
}
```

```json error
{
  "s": "invalid_grant",
  "errmsg": "Invalid grant, the account may not exist or may not be opened yet."
}
```
