Enums#

OrderClass#

enum alpaca.trading.enums.OrderClass(value)#

Represents what class of order this is.

Member Type

str

Valid values are as follows:

SIMPLE = <OrderClass.SIMPLE: 'simple'>#
BRACKET = <OrderClass.BRACKET: 'bracket'>#
OCO = <OrderClass.OCO: 'oco'>#
OTO = <OrderClass.OTO: 'oto'>#

OrderType#

enum alpaca.trading.enums.OrderType(value)#

Represents what type of roder this is.

Member Type

str

Valid values are as follows:

MARKET = <OrderType.MARKET: 'market'>#
LIMIT = <OrderType.LIMIT: 'limit'>#
STOP = <OrderType.STOP: 'stop'>#
STOP_LIMIT = <OrderType.STOP_LIMIT: 'stop_limit'>#
TRAILING_STOP = <OrderType.TRAILING_STOP: 'trailing_stop'>#

OrderSide#

enum alpaca.trading.enums.OrderSide(value)#

Represents what side this order was executed on.

Member Type

str

Valid values are as follows:

BUY = <OrderSide.BUY: 'buy'>#
SELL = <OrderSide.SELL: 'sell'>#

TimeInForce#

enum alpaca.trading.enums.TimeInForce(value)#

Represents the various time in force options for an Order.

Member Type

str

Valid values are as follows:

DAY = <TimeInForce.DAY: 'day'>#
GTC = <TimeInForce.GTC: 'gtc'>#
OPG = <TimeInForce.OPG: 'opg'>#
CLS = <TimeInForce.CLS: 'cls'>#
IOC = <TimeInForce.IOC: 'iok'>#
FOK = <TimeInForce.FOK: 'fok'>#

OrderStatus#

enum alpaca.trading.enums.OrderStatus(value)#

Represents the various states an Order can be in.

please see https://alpaca.markets/docs/api-references/broker-api/trading/orders/#order-status for more info

Member Type

str

Valid values are as follows:

NEW = <OrderStatus.NEW: 'new'>#
PARTIALLY_FILLED = <OrderStatus.PARTIALLY_FILLED: 'partially_filled'>#
FILLED = <OrderStatus.FILLED: 'filled'>#
DONE_FOR_DAY = <OrderStatus.DONE_FOR_DAY: 'done_for_day'>#
CANCELED = <OrderStatus.CANCELED: 'canceled'>#
EXPIRED = <OrderStatus.EXPIRED: 'expired'>#
REPLACED = <OrderStatus.REPLACED: 'replaced'>#
PENDING_CANCEL = <OrderStatus.PENDING_CANCEL: 'pending_cancel'>#
PENDING_REPLACE = <OrderStatus.PENDING_REPLACE: 'pending_replace'>#
ACCEPTED = <OrderStatus.ACCEPTED: 'accepted'>#
PENDING_NEW = <OrderStatus.PENDING_NEW: 'pending_new'>#
ACCEPTED_FOR_BIDDING = <OrderStatus.ACCEPTED_FOR_BIDDING: 'accepted_for_bidding'>#
STOPPED = <OrderStatus.STOPPED: 'stopped'>#
REJECTED = <OrderStatus.REJECTED: 'rejected'>#
SUSPENDED = <OrderStatus.SUSPENDED: 'suspended'>#
CALCULATED = <OrderStatus.CALCULATED: 'calculated'>#

AssetClass#

enum alpaca.trading.enums.AssetClass(value)#

Represents what class of asset this is.

Member Type

str

Valid values are as follows:

US_EQUITY = <AssetClass.US_EQUITY: 'us_equity'>#
CRYPTO = <AssetClass.CRYPTO: 'crypto'>#

AssetStatus#

enum alpaca.trading.enums.AssetStatus(value)#

Represents the various states for an Asset’s lifecycle

Member Type

str

Valid values are as follows:

ACTIVE = <AssetStatus.ACTIVE: 'active'>#
INACTIVE = <AssetStatus.INACTIVE: 'inactive'>#

AssetExchange#

enum alpaca.trading.enums.AssetExchange(value)#

Represents the current exchanges Alpaca supports.

Member Type

str

Valid values are as follows:

AMEX = <AssetExchange.AMEX: 'AMEX'>#
ARCA = <AssetExchange.ARCA: 'ARCA'>#
BATS = <AssetExchange.BATS: 'BATS'>#
NYSE = <AssetExchange.NYSE: 'NYSE'>#
NASDAQ = <AssetExchange.NASDAQ: 'NASDAQ'>#
NYSEARCA = <AssetExchange.NYSEARCA: 'NYSEARCA'>#
FTXU = <AssetExchange.FTXU: 'FTXU'>#
CBSE = <AssetExchange.CBSE: 'CBSE'>#
GNSS = <AssetExchange.GNSS: 'GNSS'>#
ERSX = <AssetExchange.ERSX: 'ERSX'>#
OTC = <AssetExchange.OTC: 'OTC'>#

PositionSide#

enum alpaca.trading.enums.PositionSide(value)#

Represents what side this position is.

Member Type

str

Valid values are as follows:

SHORT = <PositionSide.SHORT: 'short'>#
LONG = <PositionSide.LONG: 'long'>#

AccountStatus#

enum alpaca.trading.enums.AccountStatus(value)#

The various statuses each brokerage account can take during its lifetime

see https://alpaca.markets/docs/broker/api-references/accounts/accounts/#account-status

Member Type

str

Valid values are as follows:

ACCOUNT_CLOSED = <AccountStatus.ACCOUNT_CLOSED: 'ACCOUNT_CLOSED'>#
ACCOUNT_UPDATED = <AccountStatus.ACCOUNT_UPDATED: 'ACCOUNT_UPDATED'>#
ACTION_REQUIRED = <AccountStatus.ACTION_REQUIRED: 'ACTION_REQUIRED'>#
ACTIVE = <AccountStatus.ACTIVE: 'ACTIVE'>#
AML_REVIEW = <AccountStatus.AML_REVIEW: 'AML_REVIEW'>#
APPROVAL_PENDING = <AccountStatus.APPROVAL_PENDING: 'APPROVAL_PENDING'>#
APPROVED = <AccountStatus.APPROVED: 'APPROVED'>#
DISABLED = <AccountStatus.DISABLED: 'DISABLED'>#
DISABLE_PENDING = <AccountStatus.DISABLE_PENDING: 'DISABLE_PENDING'>#
EDITED = <AccountStatus.EDITED: 'EDITED'>#
INACTIVE = <AccountStatus.INACTIVE: 'INACTIVE'>#
KYC_SUBMITTED = <AccountStatus.KYC_SUBMITTED: 'KYC_SUBMITTED'>#
LIMITED = <AccountStatus.LIMITED: 'LIMITED'>#
ONBOARDING = <AccountStatus.ONBOARDING: 'ONBOARDING'>#
PAPER_ONLY = <AccountStatus.PAPER_ONLY: 'PAPER_ONLY'>#
REAPPROVAL_PENDING = <AccountStatus.REAPPROVAL_PENDING: 'REAPPROVAL_PENDING'>#
REJECTED = <AccountStatus.REJECTED: 'REJECTED'>#
RESUBMITTED = <AccountStatus.RESUBMITTED: 'RESUBMITTED'>#
SIGNED_UP = <AccountStatus.SIGNED_UP: 'SIGNED_UP'>#
SUBMISSION_FAILED = <AccountStatus.SUBMISSION_FAILED: 'SUBMISSION_FAILED'>#
SUBMITTED = <AccountStatus.SUBMITTED: 'SUBMITTED'>#

ActivityType#

enum alpaca.trading.enums.ActivityType(value)#

Represents what kind of Activity an instance of TradeActivity or NonTradeActivity is.

Please see https://alpaca.markets/docs/api-references/broker-api/accounts/account-activities/#enumactivitytype for descriptions of each of the types

Member Type

str

Valid values are as follows:

FILL = <ActivityType.FILL: 'FILL'>#
ACATC = <ActivityType.ACATC: 'ACATC'>#
ACATS = <ActivityType.ACATS: 'ACATS'>#
CIL = <ActivityType.CIL: 'CIL'>#
CSD = <ActivityType.CSD: 'CSD'>#
CSW = <ActivityType.CSW: 'CSW'>#
DIV = <ActivityType.DIV: 'DIV'>#
DIVCGL = <ActivityType.DIVCGL: 'DIVCGL'>#
DIVCGS = <ActivityType.DIVCGS: 'DIVCGS'>#
DIVNRA = <ActivityType.DIVNRA: 'DIVNRA'>#
DIVROC = <ActivityType.DIVROC: 'DIVROC'>#
DIVTXEX = <ActivityType.DIVTXEX: 'DIVTXEX'>#
FEE = <ActivityType.FEE: 'FEE'>#
INT = <ActivityType.INT: 'INT'>#
JNLC = <ActivityType.JNLC: 'JNLC'>#
JNLS = <ActivityType.JNLS: 'JNLS'>#
MA = <ActivityType.MA: 'MA'>#
PTC = <ActivityType.PTC: 'PTC'>#
REORG = <ActivityType.REORG: 'REORG'>#
SPIN = <ActivityType.SPIN: 'SPIN'>#
SPLIT = <ActivityType.SPLIT: 'SPLIT'>#

TradeActivityType#

enum alpaca.trading.enums.TradeActivityType(value)#

Represents the type of TradeActivity.

Please see https://alpaca.markets/docs/api-references/broker-api/accounts/account-activities/#attributes

Member Type

str

Valid values are as follows:

PARTIAL_FILL = <TradeActivityType.PARTIAL_FILL: 'partial_fill'>#
FILL = <TradeActivityType.FILL: 'fill'>#

NonTradeActivityStatus#

enum alpaca.trading.enums.NonTradeActivityStatus(value)#

Represents the status of a NonTradeActivity.

Please see https://alpaca.markets/docs/api-references/broker-api/accounts/account-activities/#enumaccountactivity for more info.

Member Type

str

Valid values are as follows:

EXECUTED = <NonTradeActivityStatus.EXECUTED: 'executed'>#
CORRECT = <NonTradeActivityStatus.CORRECT: 'correct'>#
CANCELED = <NonTradeActivityStatus.CANCELED: 'canceled'>#

CorporateActionType#

enum alpaca.trading.enums.CorporateActionType(value)#

The general types of corporate action events.

Learn more here: https://alpaca.markets/docs/api-references/trading-api/corporate-actions-announcements/

Member Type

str

Valid values are as follows:

DIVIDEND = <CorporateActionType.DIVIDEND: 'dividend'>#
MERGER = <CorporateActionType.MERGER: 'merger'>#
SPINOFF = <CorporateActionType.SPINOFF: 'spinoff'>#
SPLIT = <CorporateActionType.SPLIT: 'split'>#

CorporateActionSubType#

enum alpaca.trading.enums.CorporateActionSubType(value)#

The specific types of corporate actions. Each subtype is related to CorporateActionType.

Learn more here: https://alpaca.markets/docs/api-references/trading-api/corporate-actions-announcements/

Member Type

str

Valid values are as follows:

CASH = <CorporateActionSubType.CASH: 'cash'>#
STOCK = <CorporateActionSubType.STOCK: 'stock'>#
MERGER_UPDATE = <CorporateActionSubType.MERGER_UPDATE: 'merger_update'>#
MERGER_COMPLETION = <CorporateActionSubType.MERGER_COMPLETION: 'merger_completion'>#
SPINOFF = <CorporateActionSubType.SPINOFF: 'spinoff'>#
STOCK_SPLIT = <CorporateActionSubType.STOCK_SPLIT: 'stock_split'>#
UNIT_SPLIT = <CorporateActionSubType.UNIT_SPLIT: 'unit_split'>#
REVERSE_SPLIT = <CorporateActionSubType.REVERSE_SPLIT: 'reverse_split'>#
RECAPITALIZATION = <CorporateActionSubType.RECAPITALIZATION: 'recapitalization'>#

CorporateActionDateType#

enum alpaca.trading.enums.CorporateActionDateType(value)#

An enumeration.

Member Type

str

Valid values are as follows:

DECLARATION_DATE = <CorporateActionDateType.DECLARATION_DATE: 'declaration_date'>#
EX_DATE = <CorporateActionDateType.EX_DATE: 'ex_date'>#
RECORD_DATE = <CorporateActionDateType.RECORD_DATE: 'record_date'>#
PAYABLE_DATE = <CorporateActionDateType.PAYABLE_DATE: 'payable_date'>#