Models

Asset

class alpaca.trading.models.Asset(*, id: UUID, asset_class: AssetClass, exchange: AssetExchange, symbol: str, name: str | None = None, status: AssetStatus, tradable: bool, marginable: bool, shortable: bool, easy_to_borrow: bool = False, fractionable: bool, min_order_size: float | None = None, min_trade_increment: float | None = None, price_increment: float | None = None, maintenance_margin_requirement: float | None = None, attributes: List[str] | None = None, borrow_status: AssetBorrowStatus | None = None, cusip: str | None = None, margin_requirement_long: str | None = None, margin_requirement_short: str | None = None)

Represents a security. Some Assets are not tradable with Alpaca. These Assets are marked with the flag tradable=false.

For more info, visit https://alpaca.markets/docs/api-references/trading-api/assets/

id

Unique id of asset

Type:

UUID

asset_class

The name of the asset class.

Type:

AssetClass

exchange

Which exchange this asset is available through.

Type:

AssetExchange

symbol

The symbol identifier of the asset.

Type:

str

name

The name of the asset.

Type:

Optional[str]

status

The active status of the asset.

Type:

AssetStatus

tradable

Whether the asset can be traded.

Type:

bool

marginable

Whether the asset can be traded on margin.

Type:

bool

shortable

Whether the asset can be shorted.

Type:

bool

easy_to_borrow

When shorting, whether the asset is easy to borrow. Deprecated and will be removed in the next release. Use borrow_status instead. A missing or null value is False, unless borrow_status is easy_to_borrow.

Type:

bool

fractionable

Whether fractional shares are available

Type:

bool

maintenance_margin_requirement

Margin requirement percentage for the asset (equities only). Deprecated and will be removed in the next release. Use margin_requirement_long or margin_requirement_short instead. Those fields are decimal strings.

Type:

Optional[float]

attributes

One of ptp_no_exception or ptp_with_exception. It will include unique characteristics of the asset here.

Type:

Optional[List[str]]

borrow_status

Borrow status for US equity assets. Omitted for other asset classes.

Type:

Optional[AssetBorrowStatus]

cusip

The CUSIP identifier for the asset. US equities only.

Type:

Optional[str]

margin_requirement_long

Margin requirement percentage for long positions, as a decimal string.

Type:

Optional[str]

margin_requirement_short

Margin requirement percentage for short positions, as a decimal string.

Type:

Optional[str]

Position

class alpaca.trading.models.Position(*, asset_id: UUID, symbol: str, exchange: AssetExchange, asset_class: AssetClass, asset_marginable: bool | None = None, avg_entry_price: str, qty: str, side: PositionSide, market_value: str | None = None, cost_basis: str, unrealized_pl: str | None = None, unrealized_plpc: str | None = None, unrealized_intraday_pl: str | None = None, unrealized_intraday_plpc: str | None = None, current_price: str | None = None, lastday_price: str | None = None, change_today: str | None = None, swap_rate: str | None = None, avg_entry_swap_rate: str | None = None, prev_swap_rate: str | None = None, usd: USDPositionValues | None = None, qty_available: str | None = None)

Represents an open long or short holding in an asset.

asset_id

ID of the asset.

Type:

UUID

symbol

Symbol of the asset.

Type:

str

exchange

Exchange name of the asset.

Type:

AssetExchange

asset_class

Name of the asset’s asset class.

Type:

AssetClass

asset_marginable

Indicates if this asset is marginable.

Type:

Optional[bool]

avg_entry_price

The average entry price of the position.

Type:

str

qty

The number of shares of the position.

Type:

str

side

“long” or “short” representing the side of the position.

Type:

PositionSide

market_value

Total dollar amount of the position.

Type:

Optional[str]

cost_basis

Total cost basis in dollars.

Type:

str

unrealized_pl

Unrealized profit/loss in dollars.

Type:

Optional[str]

unrealized_plpc

Unrealized profit/loss percent.

Type:

Optional[str]

unrealized_intraday_pl

Unrealized profit/loss in dollars for the day.

Type:

Optional[str]

unrealized_intraday_plpc

Unrealized profit/loss percent for the day.

Type:

Optional[str]

current_price

Current asset price per share.

Type:

Optional[str]

lastday_price

Last day’s asset price per share based on the closing value of the last trading day.

Type:

Optional[str]

change_today

Percent change from last day’s price.

Type:

Optional[str]

swap_rate

Swap rate is the exchange rate (without mark-up) used to convert the price into local currency or crypto asset.

Type:

Optional[str]

avg_entry_swap_rate

The average exchange rate the price was converted into the local currency at.

Type:

Optional[str]

prev_swap_rate

The exchange rate as of the previous close.

Type:

Optional[str]

usd

Represents the position in USD values.

Type:

USDPositionValues

qty_available

Total number of shares available minus open orders.

Type:

Optional[str]

Order

class alpaca.trading.models.Order(*, id: UUID, client_order_id: str, created_at: datetime, updated_at: datetime, submitted_at: datetime, filled_at: datetime | None = None, expired_at: datetime | None = None, expires_at: datetime | None = None, canceled_at: datetime | None = None, failed_at: datetime | None = None, replaced_at: datetime | None = None, replaced_by: UUID | None = None, replaces: UUID | None = None, asset_id: UUID | None = None, symbol: str | None = None, asset_class: AssetClass | None = None, notional: str | None = None, qty: str | float | None = None, filled_qty: str | float | None = None, filled_avg_price: str | float | None = None, order_class: OrderClass, order_type: OrderType | None = None, type: OrderType | None = None, side: OrderSide | None = None, time_in_force: TimeInForce, limit_price: str | float | None = None, stop_price: str | float | None = None, status: OrderStatus, extended_hours: bool, legs: List[Order] | None = None, trail_percent: str | None = None, trail_price: str | None = None, hwm: str | None = None, position_intent: PositionIntent | None = None, ratio_qty: str | float | None = None, group_id: UUID | None = None, group_role: Annotated[OrderGroupRole | str | None, _PydanticGeneralMetadata(union_mode='left_to_right')] = None)

Represents a request for the sale or purchase of an asset.

id

order ID generated by Alpaca.

Type:

UUID

client_order_id

Client unique order ID

Type:

str

created_at

Timestamp when the order was created.

Type:

datetime

updated_at

Timestamp when the order was last updated.

Type:

datetime

submitted_at

Timestamp when the order was submitted.

Type:

datetime

filled_at

Timestamp when the order was filled.

Type:

Optional[datetime]

expired_at

Timestamp when the order expired at.

Type:

Optional[datetime]

expires_at

An auto cancel request will be triggered after this timestamp.

Type:

Optional[datetime]

canceled_at

Timestamp when the order was canceled.

Type:

Optional[datetime]

failed_at

Timestamp when the order failed at.

Type:

Optional[datetime]

replaced_at

Timestamp when the order was replaced by a new order.

Type:

Optional[datetime]

replaced_by

ID of order that replaces this order.

Type:

Optional[UUID]

replaces

ID of order which this order replaces.

Type:

Optional[UUID]

asset_id

ID of the asset. Omitted from top-level of response if the order is of mleg class.

Type:

Optional[UUID]

symbol

Symbol of the asset. Omitted from top-level of response if the order is of mleg class.

Type:

Optional[str]

asset_class

Asset class of the asset. Omitted from top-level of response if the order is of mleg class.

Type:

Optional[AssetClass]

notional

Ordered notional amount. If entered, qty will be null. Can take up to 9 decimal points.

Type:

Optional[str]

qty

Ordered quantity. If entered, notional will be null. Can take up to 9 decimal points.

Type:

Optional[str]

filled_qty

Filled quantity.

Type:

Optional[str]

filled_avg_price

Filled average price. Can be 0 until order is processed in case order is passed outside of market hours.

Type:

Optional[str]

order_class

Valid values: simple, bracket, oco or oto.

Type:

OrderClass

group_id

The opaque UUID shared by every order in the group, including its legs and replacement orders. Omitted for orders outside a bracket, oto, or oco group.

Type:

Optional[UUID]

group_role

The role of this order within the group. Valid values: entry, take_profit, or stop_loss. Omitted whenever group_id is omitted.

Type:

Optional[OrderGroupRole]

order_type

Deprecated with just type field below. Omitted from legs of mleg orders.

Type:

Optional[OrderType]

type

Valid values: market, limit, stop, stop_limit, trailing_stop. Omitted from legs of mleg orders.

Type:

Optional[OrderType]

side

Valid values: buy and sell. Omitted from top-level of response if the order is of mleg class.

Type:

Optional[OrderSide]

time_in_force

Length of time the order is in force.

Type:

TimeInForce

limit_price

Limit price of the order.

Type:

Optional[str]

stop_price

Stop price of the order.

Type:

Optional[str]

status

The status of the order.

Type:

OrderStatus

extended_hours

If true, eligible for execution outside regular trading hours.

Type:

bool

legs

When querying non-simple order_class orders in a nested style, an array of order entities associated with this order. Otherwise, null.

Type:

Optional[List[alpaca.trading.models.Order]]

trail_percent

The percent value away from the high water mark for trailing stop orders.

Type:

Optional[str]

trail_price

The dollar value away from the high water mark for trailing stop orders.

Type:

Optional[str]

hwm

The highest (lowest) market price seen since the trailing stop order was submitted.

Type:

Optional[str]

position_intent

Represents the desired position strategy.

Type:

Optional[PositionIntent]

ratio_qty

The proportional quantity of this leg in relation to the overall multi-leg order quantity.

Type:

Optional[str]

TradeAccount

class alpaca.trading.models.TradeAccount(*, id: UUID, account_number: str, status: AccountStatus, crypto_status: AccountStatus | None = None, crypto_tier: int | None = None, currency: str | None = None, buying_power: str | None = None, effective_buying_power: str | None = None, regt_buying_power: str | None = None, daytrading_buying_power: str | None = None, non_marginable_buying_power: str | None = None, cash: str | None = None, accrued_fees: str | None = None, pending_transfer_out: str | None = None, pending_transfer_in: str | None = None, portfolio_value: str | None = None, pattern_day_trader: bool | None = None, trading_blocked: bool | None = None, transfers_blocked: bool | None = None, account_blocked: bool | None = None, created_at: datetime | None = None, trade_suspended_by_user: bool | None = None, multiplier: str | None = None, shorting_enabled: bool | None = None, equity: str | None = None, last_equity: str | None = None, long_market_value: str | None = None, short_market_value: str | None = None, position_market_value: str | None = None, initial_margin: str | None = None, maintenance_margin: str | None = None, last_maintenance_margin: str | None = None, sma: str | None = None, daytrade_count: int | None = None, options_buying_power: str | None = None, options_approved_level: int | None = None, options_trading_level: int | None = None, balance_asof: str | None = None, intraday_adjustments: str | None = None, pending_reg_taf_fees: str | None = None)

Represents trading account information for an Account.

id

The account ID

Type:

UUID

account_number

The account number

Type:

str

status

The current status of the account

Type:

AccountStatus

crypto_status

The status of the account in regards to trading crypto. Only present if crypto trading is enabled for your brokerage account.

Type:

Optional[AccountStatus]

crypto_tier

The crypto trading tier assigned to the account. Only present if crypto trading is enabled.

Type:

Optional[int]

currency

Currently will always be the value “USD”.

Type:

Optional[str]

buying_power

Current available cash buying power. If multiplier = 2 then buying_power = max(equity-initial_margin(0) * 2). If multiplier = 1 then buying_power = cash.

Type:

Optional[str]

effective_buying_power

Buying power available for new orders after current requirements.

Type:

Optional[str]

regt_buying_power

User’s buying power under Regulation T ((excess equity - (equity - margin value)) * margin multiplier)

Type:

Optional[str]

daytrading_buying_power

The buying power for day trades for the account. Deprecated; removed from Alpaca responses on 2026-07-06 (FINRA intraday-margin migration) and defaults to None.

Type:

Optional[str]

non_marginable_buying_power

The non marginable buying power for the account

Type:

Optional[str]

cash

Cash balance in the account

Type:

Optional[str]

accrued_fees

Fees accrued in this account

Type:

Optional[str]

pending_transfer_out

Cash pending transfer out of this account

Type:

Optional[str]

pending_transfer_in

Cash pending transfer into this account

Type:

Optional[str]

portfolio_value

Total value of cash + holding positions. (This field is deprecated. It is equivalent to the equity field.)

Type:

str

pattern_day_trader

Whether the account is flagged as pattern day trader or not. Deprecated; removed from Alpaca responses on 2026-07-06 (FINRA intraday-margin migration) and defaults to None.

Type:

Optional[bool]

trading_blocked

If true, the account is not allowed to place orders.

Type:

Optional[bool]

transfers_blocked

If true, the account is not allowed to request money transfers.

Type:

Optional[bool]

account_blocked

If true, the account activity by user is prohibited.

Type:

Optional[bool]

created_at

Timestamp this account was created at

Type:

Optional[datetime]

trade_suspended_by_user

If true, the account is not allowed to place orders.

Type:

Optional[bool]

multiplier

Multiplier value for this account.

Type:

Optional[str]

shorting_enabled

Flag to denote whether or not the account is permitted to short

Type:

Optional[bool]

equity

This value is cash + long_market_value + short_market_value. This value isn’t calculated in the SDK it is computed on the server and we return the raw value here.

Type:

Optional[str]

last_equity

Equity as of previous trading day at 16:00:00 ET

Type:

Optional[str]

long_market_value

Real-time MtM value of all long positions held in the account

Type:

Optional[str]

short_market_value

Real-time MtM value of all short positions held in the account

Type:

Optional[str]

position_market_value

Real-time market value of the positions held in the account.

Type:

Optional[str]

initial_margin

Reg T initial margin requirement

Type:

Optional[str]

maintenance_margin

Maintenance margin requirement

Type:

Optional[str]

last_maintenance_margin

Maintenance margin requirement on the previous trading day

Type:

Optional[str]

sma

Value of Special Memorandum Account (will be used at a later date to provide additional buying_power)

Type:

Optional[str]

daytrade_count

The current number of daytrades that have been made in the last 5 trading days (inclusive of today). Deprecated; removed from Alpaca responses on 2026-07-06 (FINRA intraday-margin migration) and defaults to None.

Type:

Optional[int]

options_buying_power

Your buying power for options trading

Type:

Optional[str]

options_approved_level

The options trading level that was approved for this account. 0=disabled, 1=Covered Call/Cash-Secured Put, 2=Long Call/Put, 3=Spreads/Straddles.

Type:

Optional[int]

options_trading_level

The effective options trading level of the account. This is the minimum between account options_approved_level and account configurations max_options_trading_level. 0=disabled, 1=Covered Call/Cash-Secured Put, 2=Long, 3=Spreads/Straddles.

Type:

Optional[int]

balance_asof

The date of the snapshot for last_* fields.

Type:

Optional[str]

intraday_adjustments

Intraday adjustment from non-trade activities such as deposits and withdrawals.

Type:

Optional[str]

pending_reg_taf_fees

Pending regulatory fees for the account.

Type:

Optional[str]

AccountConfiguration

class alpaca.trading.models.AccountConfiguration(*, dtbp_check: DTBPCheck | None = None, fractional_trading: bool, max_margin_multiplier: str, no_shorting: bool, pdt_check: PDTCheck | None = None, suspend_trade: bool, trade_confirm_email: TradeConfirmationEmail, ptp_no_exception_entry: bool, max_options_trading_level: int | None = None, disable_overnight_trading: bool | None = None)

Represents configuration options for a TradeAccount.

dtbp_check

Day Trade Buying Power Check. Controls Day Trading Margin Call (DTMC) checks. Deprecated; removed from Alpaca responses on 2026-07-06 (FINRA intraday-margin migration) and defaults to None.

Type:

Optional[DTBPCheck]

fractional_trading

If true, account is able to participate in fractional trading

Type:

bool

max_margin_multiplier

A number between 1-4 that represents your max margin multiplier

Type:

str

no_shorting

If true then Account becomes long-only mode.

Type:

bool

pdt_check

Controls Pattern Day Trader (PDT) checks. Deprecated; removed from Alpaca responses on 2026-07-06 (FINRA intraday-margin migration) and defaults to None.

Type:

Optional[PDTCheck]

suspend_trade

If true Account becomes unable to submit new orders

Type:

bool

trade_confirm_email

Controls whether Trade confirmation emails are sent.

Type:

TradeConfirmationEmail

ptp_no_exception_entry

If set to true then Alpaca will accept orders for PTP symbols with no exception. Default is false.

Type:

bool

max_options_trading_level

The desired maximum options trading level. 0=disabled, 1=Covered Call/Cash-Secured Put, 2=Long Call/Put, 3=Spreads/Straddles.

Type:

Optional[int]

disable_overnight_trading

If true, overnight trading is disabled. Omitted from PATCH bodies when the caller did not set it, so a default null is not sent.

Type:

Optional[bool]

Watchlist

class alpaca.trading.models.Watchlist(*, id: UUID, account_id: UUID, name: str, created_at: datetime, updated_at: datetime, assets: List[Asset] | None = None)

A watchlist is an ordered list of assets. An account can have multiple watchlists. Learn more about watchlists in the documentation. https://alpaca.markets/docs/api-references/trading-api/watchlist/

account_id

The uuid identifying the account the watchlist belongs to

Type:

UUID

id

The unique identifier for the watchlist

Type:

UUID

name

An arbitrary string up to 64 characters identifying the watchlist

Type:

str

created_at

When the watchlist was created

Type:

datetime

updated_at

When the watchlist was last updated

Type:

datetime

assets

The assets in the watchlist, not returned from all endpoints

Type:

Optional[List[Asset]]

Clock

class alpaca.trading.models.Clock(*, timestamp: datetime, is_open: bool, next_open: datetime, next_close: datetime)

The market clock for US equity markets. Timestamps are in eastern time.

timestamp

The current timestamp.

Type:

datetime

is_open

Whether the market is currently open.

Type:

bool

next_open

The timestamp when the market will next open.

Type:

datetime

next_close

The timestamp when the market will next close.

Type:

datetime

Calendar

class alpaca.trading.models.Calendar(*, date: date, open: datetime, close: datetime, session_open: str | None = None, session_close: str | None = None, settlement_date: date | None = None)

The market calendar for equity markets. Describes the market open and close time on a given day.

date

The trading date.

Type:

date

open

The time the market opens on this date.

Type:

datetime

close

The time the market closes on this date.

Type:

datetime

session_open

The time the session opens, in HHMM format.

Type:

Optional[str]

session_close

The time the session closes, in HHMM format.

Type:

Optional[str]

settlement_date

Settlement date for trades made on this date.

Type:

Optional[date]

NonTradeActivity

class alpaca.trading.models.NonTradeActivity(*args, id: str, account_id: UUID, activity_type: ActivityType, date: date, net_amount: float, description: str, status: NonTradeActivityStatus | None = None, symbol: str | None = None, qty: float | None = None, price: float | None = None, per_share_amount: float | None = None)

A NonTradeActivity represents an Activity that happened for an account that doesn’t have to do with orders or trades.

date

The date on which the activity occurred or on which the transaction associated with the activity settled.

Type:

date

net_amount

The net amount of money (positive or negative) associated with the activity.

Type:

float

description

Extra description of the NTA if needed. Can be empty string “”

Type:

str

status

Status of the activity. Not present for all activity types.

Type:

NonTradeActivityStatus

symbol

The symbol of the security involved with the activity. Not present for all activity types.

Type:

Optional[str]

qty

For dividend activities, the number of shares that contributed to the payment. Not present for other activity types.

Type:

Optional[float]

price
Type:

Optional[float]

per_share_amount

For dividend activities, the average amount paid per share. Not present for other activity types.

Type:

Optional[float]

TradeActivity

class alpaca.trading.models.TradeActivity(*args, id: str, account_id: UUID, activity_type: ActivityType, transaction_time: datetime, type: TradeActivityType, price: float, qty: float, side: OrderSide, symbol: str, leaves_qty: float, order_id: UUID, cum_qty: float, order_status: OrderStatus)

Represents information for TradeActivities. TradeActivities are Activities that pertain to trades that happened for an account. IE Fills or partial fills for orders.

transaction_time

The time and date of when this trade was processed

Type:

datetime

type

What kind of trade this TradeActivity represents. See TradeActivityType for more details

Type:

TradeActivityType

price

The per-share price that the trade was executed at.

Type:

float

qty

The number of shares involved in the trade execution.

Type:

float

side

What side the trade this TradeActivity represents was on. See OrderSide for more information

Type:

OrderSide

symbol

The symbol of the asset that was traded

Type:

str

leaves_qty

For partially filled orders, the quantity of shares that are left to be filled. Will be 0 if order was not a partially filled order

Type:

float

order_id

The ID for the order filled

Type:

UUID

cum_qty

The cumulative quantity of shares involved in the execution.

Type:

float

order_status

The status of the order that executed the trade. See OrderStatus for more details

Type:

OrderStatus

PortfolioHistory

class alpaca.trading.models.PortfolioHistory(*, timestamp: List[int], equity: List[float], profit_loss: List[float], profit_loss_pct: List[float | None], base_value: float | None = None, base_value_asof: date | None = None, timeframe: str, cashflow: Dict[ActivityType, List[float]] = {})

Contains information about the value of a portfolio over time.

timestamp

Time of each data element, left-labeled (the beginning of time window).

Type:

List[int]

equity

Equity value of the account in dollar amount as of the end of each time window.

Type:

List[float]

profit_loss

Profit/loss in dollar from the base value.

Type:

List[float]

profit_loss_pct

Profit/loss in percentage from the base value.

Type:

List[Optional[float]]

base_value

Basis in dollar of the profit loss calculation.

Type:

Optional[float]

base_value_asof

Trading date of the closing equity used as base_value, when the baseline is a prior close.

Type:

Optional[date]

timeframe

Time window size of each data element.

Type:

str

cashflow

Cash flow amounts per activity type, if any.

Type:

Dict[ActivityType, List[float]]

ClosePositionResponse

class alpaca.trading.models.ClosePositionResponse(*, order_id: UUID | None = None, status: int | None = None, symbol: str | None = None, body: FailedClosePositionDetails | Order)

API response for a close position request. .. attribute:: order_id

ID of order that was created to liquidate the position.

type:

Optional[UUID]

status

Status code corresponding to the request to liquidate the position.

Type:

Optional[int]

symbol

The symbol of the position being closed.

Type:

Optional[str]

body

Information relating to the successful or unsuccessful closing of the position.

Type:

Optional[dict]

FailedClosePositionDetails

class alpaca.trading.models.FailedClosePositionDetails(*, code: int, message: str, available: float | None = None, existing_qty: float | None = None, held_for_orders: float | None = None, symbol: str | None = None)

API response for failed close position request.

available

The qty available.

Type:

float

code

The status code.

Type:

int

existing_qty

The total qty in account.

Type:

float

held_for_orders

The qty locked up in existing orders.

Type:

float

message

Message for failed request.

Type:

str

symbol

The symbol for the request.

Type:

str

CorporateActionAnnouncement

class alpaca.trading.models.CorporateActionAnnouncement(*, id: UUID, corporate_action_id: str, ca_type: CorporateActionType, ca_sub_type: CorporateActionSubType, initiating_symbol: str, initiating_original_cusip: str, target_symbol: str | None = None, target_original_cusip: str | None = None, declaration_date: date | None = None, ex_date: date | None = None, record_date: date | None = None, payable_date: date | None = None, cash: float, old_rate: float, new_rate: float)

An announcement of a corporate action. Corporate actions are events like dividend payouts, mergers and stock splits.

id

The unique identifier for this single announcement.

Type:

UUID

corporate_action_id

ID that remains consistent across all announcements for the same corporate action.

Type:

str

ca_type

The type of corporate action that was announced.

Type:

CorporateActionType

ca_sub_type

The specific subtype of corporate action that was announced.

Type:

CorporateActionSubType

initiating_symbol

Symbol of the company initiating the announcement.

Type:

str

initiating_original_cusip

CUSIP of the company initiating the announcement.

Type:

str

target_symbol

Symbol of the child company involved in the announcement.

Type:

Optional[str]

target_original_cusip

CUSIP of the child company involved in the announcement.

Type:

Optional[str]

declaration_date

Date the corporate action or subsequent terms update was announced.

Type:

Optional[date]

ex_date

The first date that purchasing a security will not result in a corporate action entitlement.

Type:

Optional[date]

record_date

The date an account must hold a settled position in the security in order to receive the corporate action entitlement.

Type:

Optional[date]

payable_date

The date the announcement will take effect. On this date, account stock and cash balances are expected to be processed accordingly.

Type:

Optional[date]

cash

The amount of cash to be paid per share held by an account on the record date.

Type:

float

old_rate

The denominator to determine any quantity change ratios in positions.

Type:

float

new_rate

The numerator to determine any quantity change ratios in positions.

Type:

float

OptionContract

class alpaca.trading.models.OptionContract(*, id: str, symbol: str, name: str, status: AssetStatus, tradable: bool, ppind: bool | None = None, expiration_date: date, root_symbol: str, underlying_symbol: str, underlying_asset_id: UUID, type: ContractType, style: ExerciseStyle, strike_price: float, multiplier: str | None = None, size: str, deliverables: List[OptionDeliverable] | None = None, open_interest: str | None = None, open_interest_date: date | None = None, close_price: str | None = None, close_price_date: date | None = None)

Represents an option contract.

id

The unique identifier of the option contract.

Type:

str

symbol

The symbol representing the option contract.

Type:

str

name

The name of the option contract.

Type:

str

status

The status of the option contract.

Type:

AssetStatus

tradable

Indicates whether the option contract is tradable.

Type:

bool

ppind

Whether the contract is eligible for penny price increments.

Type:

Optional[bool]

expiration_date

The expiration date of the option contract.

Type:

date

root_symbol

The root symbol of the option contract.

Type:

str

underlying_symbol

The underlying symbol of the option contract.

Type:

str

underlying_asset_id

The unique identifier of the underlying asset.

Type:

UUID

type

The type of the option contract.

Type:

ContractType

style

The style of the option contract.

Type:

ExerciseStyle

strike_price

The strike price of the option contract.

Type:

float

multiplier

Contract multiplier as a decimal string. Standard contracts use “100”.

Type:

Optional[str]

size

The size of the option contract. Usually contracts have size=100.

Type:

str

deliverables

Deliverables for the contract. The list endpoint includes this only when show_deliverables is true.

Type:

Optional[List[OptionDeliverable]]

open_interest

The open interest of the option contract.

Type:

Optional[str]

open_interest_date

The date of the open interest data.

Type:

Optional[date]

close_price

The close price of the option contract.

Type:

Optional[str]

close_price_date

The date of the close price data.

Type:

Optional[date]

OptionContractsResponse

class alpaca.trading.models.OptionContractsResponse(*, option_contracts: List[OptionContract] | None = None, next_page_token: str | None = None)

Represents a response from the option contracts endpoint.

option_contracts

The list of option contracts.

Type:

Optional[List[OptionContract]]

next_page_token

Pagination token for next page.

Type:

Optional[str]