v1

latestOpenAPI 3.0.02026-07-26166415635.8 KB
Trading

Exercise an Options Position

This endpoint enables users to exercise a held option contract, converting it into the underlying asset based on the specified terms. All available held shares of this option contract will be exercised. By default, Alpaca will automatically exercise in-the-money (ITM) contracts at expiry. Exercise requests will be processed immediately once received. Exercise requests submitted between market close and midnight will be rejected to avoid any confusion about when the exercise will settle. To cancel an exercise request or to submit a Do-not-exercise (DNE) instruction, you can use the do-not-exercise endpoint or contact our support team.

post/v1/trading/accounts/{account_id}/positions/{symbol_or_contract_id}/exercise

Path parameters

account_idstring uuid required

Account identifier.

symbol_or_contract_idstring uuid required

Option contract symbol or ID.

Request body

commissionstring decimal

The commission you want to collect from the user. (notional amount)

qtystring decimal

The number of contracts to exercise. If not provided, all contracts will be exercised.

Example request

{
  "commission": "0.25",
  "qty": "1"
}

Response

Successful Response

qty_exercisedstring decimal

The total quantity of contracts exercised.

qty_remainingstring decimal

The total quantity of contracts remaining after the exercise.