Options Trading

We're excited to support options trading! Use this section to read up on Alpaca's options trading capabilities.

🎉

Options trading is now available on PAPER!

Share your feedback on Options API for Trading API here

OpenAPI Spec

You can find our Open API docs here: <https://docs.alpaca.markets/reference>.

Enablement

In the Paper environment, options trading capability will be enabled by default - there's nothing you need to do!

Note, in production there will be a more robust experience to request options trading.

For those who do not wish to have options trading enabled, you can disable options trading by navigating to your Trading Dashboard; Account > Configure.

The Trading Account model was updated to reflect the account's options approved and trading levels.

The Account Configuration model was updated to show the maximum options trading level, and allow a user to downgrade to a lower level. Note, a different API will be provided for requesting a level upgrade for live account.

Trading Levels

Alpaca supports the below options trading levels.

LevelSupported TradesValidation
0- Options trading is disabled- NA
1- Sell a covered call
- Sell cash-secured put
- User must own sufficient underlying shares
- User must have sufficient options buying power
2- Level 1
- Buy a call
- Buy a put
- User must have sufficient options buying power

Option Contracts

Assets API Update

The Assets endpoint has an existing attributes query parameter. Symbols which have option contracts will have an attribute called options_enabled.

Querying for symbols with the options_enabled attribute allows users to identify the universe of symbols with corresponding option contracts.

Fetch Contracts

To obtain contract details, a new endpoint was introduced: /v2/options/contracts?underlying_symbols=. The endpoint supports fetching a single contract such as /v2/options/contracts/{symbol_or_id}

The default params are:

  • expiration_date_lte: Next weekend
  • limit: 100

Example: if /v2/options/contracts is called on Thursday, the response will include Thursday and Friday data. If called on a Saturday, the response will include Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, and Friday.

Here is an example of a response object:

{
    "option_contracts": [
        {
            "id": "6e58f870-fe73-4583-81e4-b9a37892c36f",
            "symbol": "AAPL240119C00100000",
            "name": "AAPL Jan 19 2024 100 Call",
            "status": "active",
            "tradable": true,
            "expiration_date": "2024-01-19",
            "root_symbol": "AAPL",
            "underlying_symbol": "AAPL",
            "underlying_asset_id": "b0b6dd9d-8b9b-48a9-ba46-b9d54906e415",
            "type": "call",
            "style": "american",
            "strike_price": "100",
            "size": "100",
            "open_interest": "6168",
            "open_interest_date": "2024-01-12",
            "close_price": "85.81",
            "close_price_date": "2024-01-12"
        },
...
	],
   "page_token": "MTAw",
   "limit": 100
}      

More detailed information regarding this endpoint can be found on the OpenAPI spec here.

Market Data

Alpaca has both streaming data for real-time quotes and trades, and REST API endpoints for the same, however, REST endpoints are considered “historical” as it’s not streaming in real-time and must be specifically called.

OPRA and Indicative Pricing Feed differences

Alpaca provides 2 different feeds to their users:

  • OPRA (Options Price Reporting Authority)
  • Indicative Pricing Feed

OPRA is the consolidated BBO feed of OPRA. OPRA Plan defines the BBO as the highest bid and lowest offer for a series of options available in one or more of the options markets maintained by the parties. OPRA feed is only available to subscribed users.

Indicative Pricing Feed is a free derivative of the original OPRA feed: the quotes are not actual OPRA quotes, they’re just indicative derivatives. The trades are also derivatives and they’re delayed by 15 minutes.

Streaming Data

Any users who have Algo Trader Plus subscription and signed the OPRA agreement, can access the OPRA feed. All authenticated users can access our indicative pricing feed for free.

FeedURLQuote Subscription LimitSubscription
OPRAwss://stream.data.alpaca.markets/v1beta1/opra1000Algo Trader Plus
Indicative Pricingwss://stream.data.alpaca.markets/v1beta1/indicative200-

The host part of the URL may change in the future.

Connecting to live streaming data is the same for options as for equities. The process to connect to streaming data is documented here. However, the endpoints are different (see the table above) and we only support trade and quote subscriptions in MsgPack (binary) format!

REST Data

Accessing our historical data is similar for options and equities. All users who have signed the OPRA agreement and have Algo Trader Plus subscription can access historical data of the last 15 minutes, the feed parameter is automatically set to opra for these users.

Free users can only access data older than 15 minutes and get indicative trades and quotes on the latest endpoints, the feed parameter is implicitly set to indicative.

The complete OpenAPI spec can be found here.

Endpoints

Latest Quotes

  • Endpoint: /v1beta1/options/quotes/latest?symbols=
  • Returns the latest bid and ask prices for the given contract symbols

Latest Trades

  • Endpoint: /v1beta1/options/trades/latest
  • Returns the latest trade data for the given contract symbols

Snapshots

  • Endpoint: /v1beta1/options/snapshots?symbols=
  • Returns: Returns the latest trade, and latest quote for the given contract symbols

Option chain

  • Endpoint: /v1beta1/options/snapshots/<UNDERLYING>
  • Returns all contract symbol snapshots for the given underlying (e.g. AAPL)

Historical Bars

  • Endpoint: /v1beta1/options/bars
  • Returns the aggregates for the given option symbols between the specified dates

Historical Trades

  • Endpoint: /v1beta1/options/trades
  • Returns the trades for the given option symbols between the specified dates

Entities

Snapshot Entity

FieldTypeDescription
latestTradetrade entityLatest trade
latestQuotequote entityLatest quote

Trade Entity

FieldTypeDescription
tstring[timestamp]Timestamp in RFC-3339 format with nanosecond precision
pnumberTrade price
sintTrade size
xstringExchange where the trade occurred
cstringTrade condition

Quotes Entity

FieldTypeDescription
tstring[timestamp]Timestamp in RFC-3339 format with nanosecond precision
bxstringBid exchange
bpnumberBid price
bsintBid size
axstringAsk exchange
apnumberAsk price
asintAsk size
cstringQuote condition

Placing an Order

Placing an order for an option contract uses the same Orders API that is used for equities and crypto asset classes.

Given the same Orders API endpoint is being used, Alpaca has implemented a series of validations to ensure the options order does not include attributes relevant to other asset classes. Some of these validations include:

  • Ensuring qty is a whole number
  • Notional must not be populated
  • time_in_force must be day
  • extended_hours must be false or not populated
  • type must be one of market, limit, stop, stop_limit

Examples of valid order payloads can be found as a child page here.

Options Positions

Good news - the existing Positions API model will work with options contracts. There is not expected to be a change to this model.

As an additive feature, we aim to support fetching positions of a certain asset class; whether that be options, equities, or crypto.

Account Activities

The existing schema for trade activities (TAs) are applicable for the options asset class. For example, the FILL activity is applicable to options and maintains it's current shape for options.

There are new non-trade activities (NTAs) entry types for options, however the schema stays the same. These NTAs reflect exercise, assignment, and expiry. More details can be found on a child page here and on the OpenAPI spec here.

🚧

On PAPER NTAs are synced at the start of the following day. While your balance and positions are updated instantly, NTAs on PAPER will be visible in the Activities endpoint only the next day

Exercise and DNE Instructions

Exercise

Contract holders may submit exercise instructions to Alpaca. Alpaca will process instructions and work with our clearing partner accordingly.

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 outside market hours will be rejected.

Endpoint: POST /v2/positions/{symbol_or_contract_id}/exercise(no body)

More details in our OpenAPI Spec here.

Do Not Exercise

To submit a Do-not-exercise (DNE) instruction, please contact our support team.

Expiration

  • In the event no instruction is provided on an ITM contract, the Alpaca system will exercise the contract as long as it is ITM by at least $0.01 USD.
  • Alpaca Operations has tooling and processes in place to identify accounts which pose a buying power risk with ITM contracts.
  • In the event the account does not have sufficient buying power to exercise an ITM position, Alpaca will sell-out the position within 1 hour before expiry.

Assignment

When Alpaca receives an assignment from our clearing partner, we will process the assignment and inform traders via email and websocket streaming events. The assignment websocket streaming event will me modeled as a non-trade activity (NTA).

FAQ

Who has access to options trading?

All users have now access to options trading on Paper.