Skip to content

Commit

Permalink
feat: adjust AccountConfiguration model
Browse files Browse the repository at this point in the history
  • Loading branch information
hiohiohio committed Jan 24, 2024
1 parent 791ce40 commit cc44ac9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion alpaca/trading/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,11 @@ class TradeConfirmationEmail(str, Enum):
"""
Used for controlling when an Account will receive a trade confirmation email.
please see https://alpaca.markets/docs/api-references/broker-api/trading/trading-configurations/#attributes
please see https://docs.alpaca.markets/reference/getaccountconfig
for more info.
"""

ALL = "all"
NONE = "none"
# please do not use this value, to support legacy code
ENABLED = "enabled" # should not be used
2 changes: 2 additions & 0 deletions alpaca/trading/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ class AccountConfiguration(BaseModel):
suspend_trade (bool): If true Account becomes unable to submit new orders
trade_confirm_email (TradeConfirmationEmail): Controls whether Trade confirmation emails are sent.
ptp_no_exception_entry (bool): If set to true then Alpaca will accept orders for PTP symbols with no exception. Default is false.
max_option_trading_level (Optional[str]): The desired maximum option trading level. 0=disabled, 1=Covered Call/Cash-Secured Put, 2=Long Call/Put.
"""

dtbp_check: DTBPCheck
Expand All @@ -548,6 +549,7 @@ class AccountConfiguration(BaseModel):
suspend_trade: bool
trade_confirm_email: TradeConfirmationEmail
ptp_no_exception_entry: bool
max_option_trading_level: Optional[str] = None


class CorporateActionAnnouncement(ModelWithID):
Expand Down

0 comments on commit cc44ac9

Please sign in to comment.