tastytrade.account

pydantic model tastytrade.account.Account(*, account_number: str, opened_at: datetime, nickname: str, account_type_name: str, is_closed: bool, day_trader_status: str | bool, is_firm_error: bool, is_firm_proprietary: bool, is_futures_approved: bool, is_test_drive: bool = False, margin_or_cash: str, is_foreign: bool, created_at: datetime, external_id: str | None = None, closed_at: str | None = None, funding_date: date | None = None, investment_objective: str | None = None, liquidity_needs: str | None = None, risk_tolerance: str | None = None, investment_time_horizon: str | None = None, futures_account_purpose: str | None = None, external_fdid: str | None = None, suitable_options_level: str | None = None, submitting_user_id: str | None = None)

Bases: TastytradeData

Dataclass that represents a Tastytrade account object, containing methods for retrieving information about the account, placing orders, and retrieving past transactions.

Show JSON schema
{
   "title": "Account",
   "description": "Dataclass that represents a Tastytrade account object, containing\nmethods for retrieving information about the account, placing orders,\nand retrieving past transactions.",
   "type": "object",
   "properties": {
      "account-number": {
         "title": "Account-Number",
         "type": "string"
      },
      "opened-at": {
         "format": "date-time",
         "title": "Opened-At",
         "type": "string"
      },
      "nickname": {
         "title": "Nickname",
         "type": "string"
      },
      "account-type-name": {
         "title": "Account-Type-Name",
         "type": "string"
      },
      "is-closed": {
         "title": "Is-Closed",
         "type": "boolean"
      },
      "day-trader-status": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "boolean"
            }
         ],
         "title": "Day-Trader-Status"
      },
      "is-firm-error": {
         "title": "Is-Firm-Error",
         "type": "boolean"
      },
      "is-firm-proprietary": {
         "title": "Is-Firm-Proprietary",
         "type": "boolean"
      },
      "is-futures-approved": {
         "title": "Is-Futures-Approved",
         "type": "boolean"
      },
      "is-test-drive": {
         "default": false,
         "title": "Is-Test-Drive",
         "type": "boolean"
      },
      "margin-or-cash": {
         "title": "Margin-Or-Cash",
         "type": "string"
      },
      "is-foreign": {
         "title": "Is-Foreign",
         "type": "boolean"
      },
      "created-at": {
         "format": "date-time",
         "title": "Created-At",
         "type": "string"
      },
      "external-id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "External-Id"
      },
      "closed-at": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Closed-At"
      },
      "funding-date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Funding-Date"
      },
      "investment-objective": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Investment-Objective"
      },
      "liquidity-needs": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Liquidity-Needs"
      },
      "risk-tolerance": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Risk-Tolerance"
      },
      "investment-time-horizon": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Investment-Time-Horizon"
      },
      "futures-account-purpose": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Futures-Account-Purpose"
      },
      "external-fdid": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "External-Fdid"
      },
      "suitable-options-level": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Suitable-Options-Level"
      },
      "submitting-user-id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Submitting-User-Id"
      }
   },
   "required": [
      "account-number",
      "opened-at",
      "nickname",
      "account-type-name",
      "is-closed",
      "day-trader-status",
      "is-firm-error",
      "is-firm-proprietary",
      "is-futures-approved",
      "margin-or-cash",
      "is-foreign",
      "created-at"
   ]
}

Fields:
field account_number : str [Required] (alias 'account-number')
field account_type_name : str [Required] (alias 'account-type-name')
field closed_at : str | None = None (alias 'closed-at')
field created_at : datetime [Required] (alias 'created-at')
field day_trader_status : str | bool [Required] (alias 'day-trader-status')
field external_fdid : str | None = None (alias 'external-fdid')
field external_id : str | None = None (alias 'external-id')
field funding_date : date | None = None (alias 'funding-date')
field futures_account_purpose : str | None = None (alias 'futures-account-purpose')
field investment_objective : str | None = None (alias 'investment-objective')
field investment_time_horizon : str | None = None (alias 'investment-time-horizon')
field is_closed : bool [Required] (alias 'is-closed')
field is_firm_error : bool [Required] (alias 'is-firm-error')
field is_firm_proprietary : bool [Required] (alias 'is-firm-proprietary')
field is_foreign : bool [Required] (alias 'is-foreign')
field is_futures_approved : bool [Required] (alias 'is-futures-approved')
field is_test_drive : bool = False (alias 'is-test-drive')
field liquidity_needs : str | None = None (alias 'liquidity-needs')
field margin_or_cash : str [Required] (alias 'margin-or-cash')
field nickname : str [Required]
field opened_at : datetime [Required] (alias 'opened-at')
field risk_tolerance : str | None = None (alias 'risk-tolerance')
field submitting_user_id : str | None = None (alias 'submitting-user-id')
field suitable_options_level : str | None = None (alias 'suitable-options-level')
async classmethod get(session: Session, *, include_closed: bool = False) list[Self]
async classmethod get(session: Session, account_number: str) Self

Gets all trading accounts associated with the Tastytrade user, or a specific one if given an account ID.

Parameters:
session: Session

the session to use for the request.

account_number: str

the account ID to get.

include_closed: bool = False

whether to include closed accounts in the results

async delete_complex_order(session: Session, order_id: int) None

Delete a complex order by ID.

Parameters:
session: Session

the session to use for the request.

order_id: int

the ID of the order to delete.

async delete_order(session: Session, order_id: int) None

Delete an order by ID.

Parameters:
session: Session

the session to use for the request.

order_id: int

the ID of the order to delete.

async get_balance_snapshots(session: Session, per_page: int = 250, page_offset: int | None = 0, currency: str = 'USD', end_date: date | None = None, start_date: date | None = None, snapshot_date: date | None = None, time_of_day: 'BOD' | 'EOD' = 'EOD') list[AccountBalanceSnapshot]

Returns a list of balance snapshots. This list will just have a few snapshots if you don’t pass a start date; otherwise, it will be each day’s balances in the given range.

Parameters:
session: Session

the session to use for the request.

per_page: int = 250

the number of results to return per page.

page_offset: int | None = 0

provide a specific page to get; if None, get all pages

currency: str = 'USD'

the currency to show balances in.

start_date: date | None = None

the starting date of the range.

end_date: date | None = None

the ending date of the range.

snapshot_date: date | None = None

the date of the snapshot to get.

time_of_day: 'BOD' | 'EOD' = 'EOD'

the time of day of the snapshots to get, either ‘EOD’ (End Of Day) or ‘BOD’ (Beginning Of Day).

async get_balances(session: Session, currency: str = 'USD') AccountBalance

Get the current balances of the account.

Parameters:
session: Session

the session to use for the request

currency: str = 'USD'

the currency to state balances in

async get_complex_order(session: Session, order_id: int) PlacedComplexOrder

Gets a complex order with the given ID.

Parameters:
session: Session

the session to use for the request.

order_id: int

the ID of the order to fetch.

async get_complex_order_history(session: Session, per_page: int = 50, page_offset: int | None = 0) list[PlacedComplexOrder]

Get order history of the account.

Parameters:
session: Session

the session to use for the request.

per_page: int = 50

the number of results to return per page.

page_offset: int | None = 0

provide a specific page to get; if None, get all pages

async get_history(session: Session, per_page: int = 250, page_offset: int | None = 0, sort: 'Asc' | 'Desc' = 'Desc', type: str | None = None, types: Iterable[str] | None = None, sub_types: Iterable[str] | None = None, start_date: date | None = None, end_date: date | None = None, instrument_type: InstrumentType | None = None, symbol: str | None = None, underlying_symbol: str | None = None, action: str | None = None, partition_key: str | None = None, futures_symbol: str | None = None, start_at: datetime | None = None, end_at: datetime | None = None) list[Transaction]

Get transaction history of the account.

Parameters:
session: Session

the session to use for the request.

per_page: int = 250

the number of results to return per page.

page_offset: int | None = 0

provide a specific page to get; if None, get all pages

sort: 'Asc' | 'Desc' = 'Desc'

the order to sort results in, either ‘Desc’ or ‘Asc’.

type: str | None = None

the type of transaction.

types: Iterable[str] | None = None

a list of transaction types to filter by.

sub_types: Iterable[str] | None = None

an array of transaction subtypes to filter by.

start_date: date | None = None

the start date of transactions to query.

end_date: date | None = None

the end date of transactions to query.

instrument_type: InstrumentType | None = None

the type of instrument.

symbol: str | None = None

a single symbol.

underlying_symbol: str | None = None

the underlying symbol.

action: str | None = None

the action of the transaction: ‘Sell to Open’, ‘Sell to Close’, ‘Buy to Open’, ‘Buy to Close’, ‘Sell’ or ‘Buy’.

partition_key: str | None = None

account partition key.

futures_symbol: str | None = None

the full TW Future Symbol, e.g. /ESZ9, /NGZ19.

start_at: datetime | None = None

datetime start range for filtering transactions in full date-time.

end_at: datetime | None = None

datetime end range for filtering transactions in full date-time.

async get_live_complex_orders(session: Session) list[PlacedComplexOrder]

Get complex orders placed today for the account.

Parameters:
session: Session

the session to use for the request.

async get_live_orders(session: Session) list[PlacedOrder]

Get orders placed today for the account.

Parameters:
session: Session

the session to use for the request.

async get_margin_requirements(session: Session) MarginReport

Get the margin report for the account, with total margin requirements as well as a breakdown per symbol/instrument.

Parameters:
session: Session

the session to use for the request.

async get_net_liquidating_value_history(session: Session, time_back: str | None = None, start_time: datetime | None = None) list[NetLiqOhlc]

Returns a list of account net liquidating value snapshots over the specified time period.

Parameters:
session: Session

the session to use for the request, can’t be certification.

time_back: str | None = None

the time period to get net liquidating value snapshots for. This param is required if start_time is not given. Possible values are: ‘1d’, ‘1m’, ‘3m’, ‘6m’, ‘1y’, ‘all’.

start_time: datetime | None = None

the start point for the query. This param is required is time-back is not given. If given, will take precedence over time-back.

async get_order(session: Session, order_id: int) PlacedOrder

Gets an order with the given ID.

Parameters:
session: Session

the session to use for the request.

order_id: int

the ID of the order to fetch.

async get_order_buying_power_effect(session: Session, order: NewOrder) BuyingPowerEffect

Calculate the buying power effect for the given order.

Parameters:
session: Session

the session to use for the request.

order: NewOrder

the order to calculate usage for.

async get_order_history(session: Session, per_page: int = 50, page_offset: int | None = 0, start_date: date | None = None, end_date: date | None = None, underlying_symbol: str | None = None, statuses: Iterable[OrderStatus] | None = None, futures_symbol: str | None = None, underlying_instrument_type: InstrumentType | None = None, sort: 'Asc' | 'Desc' | None = None, start_at: datetime | None = None, end_at: datetime | None = None) list[PlacedOrder]

Get order history of the account.

Parameters:
session: Session

the session to use for the request.

per_page: int = 50

the number of results to return per page.

page_offset: int | None = 0

provide a specific page to get; if None, get all pages

start_date: date | None = None

the start date of orders to query.

end_date: date | None = None

the end date of orders to query.

underlying_symbol: str | None = None

underlying symbol to filter by.

statuses: Iterable[OrderStatus] | None = None

a list of statuses to filter by.

futures_symbol: str | None = None

Tastytrade future symbol for futures and future options.

underlying_instrument_type: InstrumentType | None = None

the type of instrument to filter by

sort: 'Asc' | 'Desc' | None = None

the order to sort results in, either ‘Desc’ or ‘Asc’.

start_at: datetime | None = None

datetime start range for filtering transactions in full date-time.

end_at: datetime | None = None

datetime end range for filtering transactions in full date-time.

async get_positions(session: Session, underlying_symbols: Iterable[str] | None = None, symbol: str | None = None, instrument_type: InstrumentType | None = None, include_closed: bool | None = None, underlying_product_code: str | None = None, partition_keys: Iterable[str] | None = None, net_positions: bool | None = None, include_marks: bool | None = None) list[CurrentPosition]

Get the current positions of the account.

Parameters:
session: Session

the session to use for the request.

underlying_symbols: Iterable[str] | None = None

an array of underlying symbols for positions.

symbol: str | None = None

a single symbol.

instrument_type: InstrumentType | None = None

the type of instrument.

include_closed: bool | None = None

if closed positions should be included in the query.

underlying_product_code: str | None = None

the underlying future’s product code.

partition_keys: Iterable[str] | None = None

account partition keys.

net_positions: bool | None = None

returns net positions grouped by instrument type and symbol.

include_marks: bool | None = None

include current quote mark (note: can decrease performance).

async get_total_fees(session: Session, day: date | None = None) FeesInfo

Get the total fees for a given date.

Parameters:
session: Session

the session to use for the request.

day: date | None = None

the date to get fees for.

async get_trading_status(session: Session) TradingStatus

Get the trading status of the account.

Parameters:
session: Session

the session to use for the request.

async get_transaction(session: Session, id: int) Transaction

Get a single transaction by ID.

Parameters:
session: Session

the session to use for the request.

id: int

the ID of the transaction to fetch.

async place_complex_order(session: Session, order: NewComplexOrder, dry_run: bool = True) PlacedComplexOrderResponse

Place the given order.

Parameters:
session: Session

the session to use for the request.

order: NewComplexOrder

the order to place.

dry_run: bool = True

whether this is a test order or not.

async place_order(session: Session, order: NewOrder, dry_run: bool = True) PlacedOrderResponse

Place the given order.

Parameters:
session: Session

the session to use for the request.

order: NewOrder

the order to place.

dry_run: bool = True

whether this is a test order or not.

async replace_order(session: Session, old_order_id: int, new_order: NewOrder) PlacedOrder

Replace an order with a new order with different characteristics (but same legs).

Parameters:
session: Session

the session to use for the request.

old_order_id: int

the ID of the order to replace.

new_order: NewOrder

the new order to replace the old order with.

pydantic model tastytrade.account.AccountBalance(*, account_number: str, cash_balance: Decimal, long_equity_value: Decimal, short_equity_value: Decimal, long_derivative_value: Decimal, short_derivative_value: Decimal, long_futures_value: Decimal, short_futures_value: Decimal, long_futures_derivative_value: Decimal, short_futures_derivative_value: Decimal, long_margineable_value: Decimal, short_margineable_value: Decimal, margin_equity: Decimal, equity_buying_power: Decimal, derivative_buying_power: Decimal, day_trading_buying_power: Decimal, futures_margin_requirement: Decimal, available_trading_funds: Decimal, maintenance_requirement: Decimal, maintenance_call_value: Decimal, reg_t_call_value: Decimal, day_trading_call_value: Decimal, day_equity_call_value: Decimal, net_liquidating_value: Decimal, cash_available_to_withdraw: Decimal, day_trade_excess: Decimal, pending_cash: Decimal, long_cryptocurrency_value: Decimal, short_cryptocurrency_value: Decimal, cryptocurrency_margin_requirement: Decimal, unsettled_cryptocurrency_fiat_amount: Decimal, closed_loop_available_balance: Decimal, equity_offering_margin_requirement: Decimal, long_bond_value: Decimal, bond_margin_requirement: Decimal, used_derivative_buying_power: Decimal, snapshot_date: date, reg_t_margin_requirement: Decimal, futures_overnight_margin_requirement: Decimal, futures_intraday_margin_requirement: Decimal, maintenance_excess: Decimal, pending_margin_interest: Decimal, effective_cryptocurrency_buying_power: Decimal, updated_at: datetime, apex_starting_day_margin_equity: Decimal | None = None, buying_power_adjustment: Decimal | None = None, time_of_day: str | None = None)

Bases: TastytradeData

Dataclass containing account balance information.

Show JSON schema
{
   "title": "AccountBalance",
   "description": "Dataclass containing account balance information.",
   "type": "object",
   "properties": {
      "account-number": {
         "title": "Account-Number",
         "type": "string"
      },
      "cash-balance": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Cash-Balance"
      },
      "long-equity-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Equity-Value"
      },
      "short-equity-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Short-Equity-Value"
      },
      "long-derivative-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Derivative-Value"
      },
      "short-derivative-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Short-Derivative-Value"
      },
      "long-futures-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Futures-Value"
      },
      "short-futures-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Short-Futures-Value"
      },
      "long-futures-derivative-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Futures-Derivative-Value"
      },
      "short-futures-derivative-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Short-Futures-Derivative-Value"
      },
      "long-margineable-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Margineable-Value"
      },
      "short-margineable-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Short-Margineable-Value"
      },
      "margin-equity": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Margin-Equity"
      },
      "equity-buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Equity-Buying-Power"
      },
      "derivative-buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Derivative-Buying-Power"
      },
      "day-trading-buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Day-Trading-Buying-Power"
      },
      "futures-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Futures-Margin-Requirement"
      },
      "available-trading-funds": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Available-Trading-Funds"
      },
      "maintenance-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Maintenance-Requirement"
      },
      "maintenance-call-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Maintenance-Call-Value"
      },
      "reg-t-call-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Reg-T-Call-Value"
      },
      "day-trading-call-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Day-Trading-Call-Value"
      },
      "day-equity-call-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Day-Equity-Call-Value"
      },
      "net-liquidating-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Net-Liquidating-Value"
      },
      "cash-available-to-withdraw": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Cash-Available-To-Withdraw"
      },
      "day-trade-excess": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Day-Trade-Excess"
      },
      "pending-cash": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Pending-Cash"
      },
      "long-cryptocurrency-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Cryptocurrency-Value"
      },
      "short-cryptocurrency-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Short-Cryptocurrency-Value"
      },
      "cryptocurrency-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Cryptocurrency-Margin-Requirement"
      },
      "unsettled-cryptocurrency-fiat-amount": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Unsettled-Cryptocurrency-Fiat-Amount"
      },
      "closed-loop-available-balance": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Closed-Loop-Available-Balance"
      },
      "equity-offering-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Equity-Offering-Margin-Requirement"
      },
      "long-bond-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Bond-Value"
      },
      "bond-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Bond-Margin-Requirement"
      },
      "used-derivative-buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Used-Derivative-Buying-Power"
      },
      "snapshot-date": {
         "format": "date",
         "title": "Snapshot-Date",
         "type": "string"
      },
      "reg-t-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Reg-T-Margin-Requirement"
      },
      "futures-overnight-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Futures-Overnight-Margin-Requirement"
      },
      "futures-intraday-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Futures-Intraday-Margin-Requirement"
      },
      "maintenance-excess": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Maintenance-Excess"
      },
      "pending-margin-interest": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Pending-Margin-Interest"
      },
      "effective-cryptocurrency-buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Effective-Cryptocurrency-Buying-Power"
      },
      "updated-at": {
         "format": "date-time",
         "title": "Updated-At",
         "type": "string"
      },
      "apex-starting-day-margin-equity": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Apex-Starting-Day-Margin-Equity"
      },
      "buying-power-adjustment": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Buying-Power-Adjustment"
      },
      "time-of-day": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Time-Of-Day"
      }
   },
   "required": [
      "account-number",
      "cash-balance",
      "long-equity-value",
      "short-equity-value",
      "long-derivative-value",
      "short-derivative-value",
      "long-futures-value",
      "short-futures-value",
      "long-futures-derivative-value",
      "short-futures-derivative-value",
      "long-margineable-value",
      "short-margineable-value",
      "margin-equity",
      "equity-buying-power",
      "derivative-buying-power",
      "day-trading-buying-power",
      "futures-margin-requirement",
      "available-trading-funds",
      "maintenance-requirement",
      "maintenance-call-value",
      "reg-t-call-value",
      "day-trading-call-value",
      "day-equity-call-value",
      "net-liquidating-value",
      "cash-available-to-withdraw",
      "day-trade-excess",
      "pending-cash",
      "long-cryptocurrency-value",
      "short-cryptocurrency-value",
      "cryptocurrency-margin-requirement",
      "unsettled-cryptocurrency-fiat-amount",
      "closed-loop-available-balance",
      "equity-offering-margin-requirement",
      "long-bond-value",
      "bond-margin-requirement",
      "used-derivative-buying-power",
      "snapshot-date",
      "reg-t-margin-requirement",
      "futures-overnight-margin-requirement",
      "futures-intraday-margin-requirement",
      "maintenance-excess",
      "pending-margin-interest",
      "effective-cryptocurrency-buying-power",
      "updated-at"
   ]
}

Fields:
Validators:
field account_number : str [Required] (alias 'account-number')
Validated by:
field apex_starting_day_margin_equity : Decimal | None = None (alias 'apex-starting-day-margin-equity')
Validated by:
field available_trading_funds : Decimal [Required] (alias 'available-trading-funds')
Validated by:
field bond_margin_requirement : Decimal [Required] (alias 'bond-margin-requirement')
Validated by:
field buying_power_adjustment : Decimal | None = None (alias 'buying-power-adjustment')
Validated by:
field cash_available_to_withdraw : Decimal [Required] (alias 'cash-available-to-withdraw')
Validated by:
field cash_balance : Decimal [Required] (alias 'cash-balance')
Validated by:
field closed_loop_available_balance : Decimal [Required] (alias 'closed-loop-available-balance')
Validated by:
field cryptocurrency_margin_requirement : Decimal [Required] (alias 'cryptocurrency-margin-requirement')
Validated by:
field day_equity_call_value : Decimal [Required] (alias 'day-equity-call-value')
Validated by:
field day_trade_excess : Decimal [Required] (alias 'day-trade-excess')
Validated by:
field day_trading_buying_power : Decimal [Required] (alias 'day-trading-buying-power')
Validated by:
field day_trading_call_value : Decimal [Required] (alias 'day-trading-call-value')
Validated by:
field derivative_buying_power : Decimal [Required] (alias 'derivative-buying-power')
Validated by:
field effective_cryptocurrency_buying_power : Decimal [Required] (alias 'effective-cryptocurrency-buying-power')
Validated by:
field equity_buying_power : Decimal [Required] (alias 'equity-buying-power')
Validated by:
field equity_offering_margin_requirement : Decimal [Required] (alias 'equity-offering-margin-requirement')
Validated by:
field futures_intraday_margin_requirement : Decimal [Required] (alias 'futures-intraday-margin-requirement')
Validated by:
field futures_margin_requirement : Decimal [Required] (alias 'futures-margin-requirement')
Validated by:
field futures_overnight_margin_requirement : Decimal [Required] (alias 'futures-overnight-margin-requirement')
Validated by:
field long_bond_value : Decimal [Required] (alias 'long-bond-value')
Validated by:
field long_cryptocurrency_value : Decimal [Required] (alias 'long-cryptocurrency-value')
Validated by:
field long_derivative_value : Decimal [Required] (alias 'long-derivative-value')
Validated by:
field long_equity_value : Decimal [Required] (alias 'long-equity-value')
Validated by:
field long_futures_derivative_value : Decimal [Required] (alias 'long-futures-derivative-value')
Validated by:
field long_futures_value : Decimal [Required] (alias 'long-futures-value')
Validated by:
field long_margineable_value : Decimal [Required] (alias 'long-margineable-value')
Validated by:
field maintenance_call_value : Decimal [Required] (alias 'maintenance-call-value')
Validated by:
field maintenance_excess : Decimal [Required] (alias 'maintenance-excess')
Validated by:
field maintenance_requirement : Decimal [Required] (alias 'maintenance-requirement')
Validated by:
field margin_equity : Decimal [Required] (alias 'margin-equity')
Validated by:
field net_liquidating_value : Decimal [Required] (alias 'net-liquidating-value')
Validated by:
field pending_cash : Decimal [Required] (alias 'pending-cash')
Validated by:
field pending_margin_interest : Decimal [Required] (alias 'pending-margin-interest')
Validated by:
field reg_t_call_value : Decimal [Required] (alias 'reg-t-call-value')
Validated by:
field reg_t_margin_requirement : Decimal [Required] (alias 'reg-t-margin-requirement')
Validated by:
field short_cryptocurrency_value : Decimal [Required] (alias 'short-cryptocurrency-value')
Validated by:
field short_derivative_value : Decimal [Required] (alias 'short-derivative-value')
Validated by:
field short_equity_value : Decimal [Required] (alias 'short-equity-value')
Validated by:
field short_futures_derivative_value : Decimal [Required] (alias 'short-futures-derivative-value')
Validated by:
field short_futures_value : Decimal [Required] (alias 'short-futures-value')
Validated by:
field short_margineable_value : Decimal [Required] (alias 'short-margineable-value')
Validated by:
field snapshot_date : date [Required] (alias 'snapshot-date')
Validated by:
field time_of_day : str | None = None (alias 'time-of-day')
Validated by:
field unsettled_cryptocurrency_fiat_amount : Decimal [Required] (alias 'unsettled-cryptocurrency-fiat-amount')
Validated by:
field updated_at : datetime [Required] (alias 'updated-at')
Validated by:
field used_derivative_buying_power : Decimal [Required] (alias 'used-derivative-buying-power')
Validated by:
validator validate_price_effects  »  all fields
pydantic model tastytrade.account.AccountBalanceSnapshot(*, account_number: str, cash_balance: Decimal, long_equity_value: Decimal, short_equity_value: Decimal, long_derivative_value: Decimal, short_derivative_value: Decimal, long_futures_value: Decimal, short_futures_value: Decimal, long_futures_derivative_value: Decimal, short_futures_derivative_value: Decimal, long_margineable_value: Decimal, short_margineable_value: Decimal, margin_equity: Decimal, equity_buying_power: Decimal, derivative_buying_power: Decimal, day_trading_buying_power: Decimal, futures_margin_requirement: Decimal, available_trading_funds: Decimal, maintenance_requirement: Decimal, maintenance_call_value: Decimal, reg_t_call_value: Decimal, day_trading_call_value: Decimal, day_equity_call_value: Decimal, net_liquidating_value: Decimal, cash_available_to_withdraw: Decimal, day_trade_excess: Decimal, pending_cash: Decimal, snapshot_date: date, time_of_day: str | None = None, long_cryptocurrency_value: Decimal | None = None, short_cryptocurrency_value: Decimal | None = None, cryptocurrency_margin_requirement: Decimal | None = None, unsettled_cryptocurrency_fiat_amount: Decimal | None = None, closed_loop_available_balance: Decimal | None = None, equity_offering_margin_requirement: Decimal | None = None, long_bond_value: Decimal | None = None, bond_margin_requirement: Decimal | None = None, used_derivative_buying_power: Decimal | None = None)

Bases: TastytradeData

Dataclass containing account balance for a moment in time (snapshot).

Show JSON schema
{
   "title": "AccountBalanceSnapshot",
   "description": "Dataclass containing account balance for a moment in time (snapshot).",
   "type": "object",
   "properties": {
      "account-number": {
         "title": "Account-Number",
         "type": "string"
      },
      "cash-balance": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Cash-Balance"
      },
      "long-equity-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Equity-Value"
      },
      "short-equity-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Short-Equity-Value"
      },
      "long-derivative-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Derivative-Value"
      },
      "short-derivative-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Short-Derivative-Value"
      },
      "long-futures-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Futures-Value"
      },
      "short-futures-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Short-Futures-Value"
      },
      "long-futures-derivative-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Futures-Derivative-Value"
      },
      "short-futures-derivative-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Short-Futures-Derivative-Value"
      },
      "long-margineable-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Long-Margineable-Value"
      },
      "short-margineable-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Short-Margineable-Value"
      },
      "margin-equity": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Margin-Equity"
      },
      "equity-buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Equity-Buying-Power"
      },
      "derivative-buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Derivative-Buying-Power"
      },
      "day-trading-buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Day-Trading-Buying-Power"
      },
      "futures-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Futures-Margin-Requirement"
      },
      "available-trading-funds": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Available-Trading-Funds"
      },
      "maintenance-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Maintenance-Requirement"
      },
      "maintenance-call-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Maintenance-Call-Value"
      },
      "reg-t-call-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Reg-T-Call-Value"
      },
      "day-trading-call-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Day-Trading-Call-Value"
      },
      "day-equity-call-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Day-Equity-Call-Value"
      },
      "net-liquidating-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Net-Liquidating-Value"
      },
      "cash-available-to-withdraw": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Cash-Available-To-Withdraw"
      },
      "day-trade-excess": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Day-Trade-Excess"
      },
      "pending-cash": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Pending-Cash"
      },
      "snapshot-date": {
         "format": "date",
         "title": "Snapshot-Date",
         "type": "string"
      },
      "time-of-day": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Time-Of-Day"
      },
      "long-cryptocurrency-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Long-Cryptocurrency-Value"
      },
      "short-cryptocurrency-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Short-Cryptocurrency-Value"
      },
      "cryptocurrency-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Cryptocurrency-Margin-Requirement"
      },
      "unsettled-cryptocurrency-fiat-amount": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Unsettled-Cryptocurrency-Fiat-Amount"
      },
      "closed-loop-available-balance": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Closed-Loop-Available-Balance"
      },
      "equity-offering-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Equity-Offering-Margin-Requirement"
      },
      "long-bond-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Long-Bond-Value"
      },
      "bond-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Bond-Margin-Requirement"
      },
      "used-derivative-buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Used-Derivative-Buying-Power"
      }
   },
   "required": [
      "account-number",
      "cash-balance",
      "long-equity-value",
      "short-equity-value",
      "long-derivative-value",
      "short-derivative-value",
      "long-futures-value",
      "short-futures-value",
      "long-futures-derivative-value",
      "short-futures-derivative-value",
      "long-margineable-value",
      "short-margineable-value",
      "margin-equity",
      "equity-buying-power",
      "derivative-buying-power",
      "day-trading-buying-power",
      "futures-margin-requirement",
      "available-trading-funds",
      "maintenance-requirement",
      "maintenance-call-value",
      "reg-t-call-value",
      "day-trading-call-value",
      "day-equity-call-value",
      "net-liquidating-value",
      "cash-available-to-withdraw",
      "day-trade-excess",
      "pending-cash",
      "snapshot-date"
   ]
}

Fields:
Validators:
field account_number : str [Required] (alias 'account-number')
Validated by:
field available_trading_funds : Decimal [Required] (alias 'available-trading-funds')
Validated by:
field bond_margin_requirement : Decimal | None = None (alias 'bond-margin-requirement')
Validated by:
field cash_available_to_withdraw : Decimal [Required] (alias 'cash-available-to-withdraw')
Validated by:
field cash_balance : Decimal [Required] (alias 'cash-balance')
Validated by:
field closed_loop_available_balance : Decimal | None = None (alias 'closed-loop-available-balance')
Validated by:
field cryptocurrency_margin_requirement : Decimal | None = None (alias 'cryptocurrency-margin-requirement')
Validated by:
field day_equity_call_value : Decimal [Required] (alias 'day-equity-call-value')
Validated by:
field day_trade_excess : Decimal [Required] (alias 'day-trade-excess')
Validated by:
field day_trading_buying_power : Decimal [Required] (alias 'day-trading-buying-power')
Validated by:
field day_trading_call_value : Decimal [Required] (alias 'day-trading-call-value')
Validated by:
field derivative_buying_power : Decimal [Required] (alias 'derivative-buying-power')
Validated by:
field equity_buying_power : Decimal [Required] (alias 'equity-buying-power')
Validated by:
field equity_offering_margin_requirement : Decimal | None = None (alias 'equity-offering-margin-requirement')
Validated by:
field futures_margin_requirement : Decimal [Required] (alias 'futures-margin-requirement')
Validated by:
field long_bond_value : Decimal | None = None (alias 'long-bond-value')
Validated by:
field long_cryptocurrency_value : Decimal | None = None (alias 'long-cryptocurrency-value')
Validated by:
field long_derivative_value : Decimal [Required] (alias 'long-derivative-value')
Validated by:
field long_equity_value : Decimal [Required] (alias 'long-equity-value')
Validated by:
field long_futures_derivative_value : Decimal [Required] (alias 'long-futures-derivative-value')
Validated by:
field long_futures_value : Decimal [Required] (alias 'long-futures-value')
Validated by:
field long_margineable_value : Decimal [Required] (alias 'long-margineable-value')
Validated by:
field maintenance_call_value : Decimal [Required] (alias 'maintenance-call-value')
Validated by:
field maintenance_requirement : Decimal [Required] (alias 'maintenance-requirement')
Validated by:
field margin_equity : Decimal [Required] (alias 'margin-equity')
Validated by:
field net_liquidating_value : Decimal [Required] (alias 'net-liquidating-value')
Validated by:
field pending_cash : Decimal [Required] (alias 'pending-cash')
Validated by:
field reg_t_call_value : Decimal [Required] (alias 'reg-t-call-value')
Validated by:
field short_cryptocurrency_value : Decimal | None = None (alias 'short-cryptocurrency-value')
Validated by:
field short_derivative_value : Decimal [Required] (alias 'short-derivative-value')
Validated by:
field short_equity_value : Decimal [Required] (alias 'short-equity-value')
Validated by:
field short_futures_derivative_value : Decimal [Required] (alias 'short-futures-derivative-value')
Validated by:
field short_futures_value : Decimal [Required] (alias 'short-futures-value')
Validated by:
field short_margineable_value : Decimal [Required] (alias 'short-margineable-value')
Validated by:
field snapshot_date : date [Required] (alias 'snapshot-date')
Validated by:
field time_of_day : str | None = None (alias 'time-of-day')
Validated by:
field unsettled_cryptocurrency_fiat_amount : Decimal | None = None (alias 'unsettled-cryptocurrency-fiat-amount')
Validated by:
field used_derivative_buying_power : Decimal | None = None (alias 'used-derivative-buying-power')
Validated by:
validator validate_price_effects  »  all fields
pydantic model tastytrade.account.CurrentPosition(*, account_number: str, symbol: str, instrument_type: InstrumentType, underlying_symbol: str, quantity: Decimal, quantity_direction: str, close_price: Decimal, average_open_price: Decimal, multiplier: Decimal, cost_effect: str, is_suppressed: bool, is_frozen: bool, realized_day_gain: Decimal, realized_today: Decimal, created_at: datetime, updated_at: datetime, mark: Decimal | None = None, mark_price: Decimal | None = None, restricted_quantity: Decimal | None = None, expires_at: datetime | None = None, fixing_price: Decimal | None = None, deliverable_type: str | None = None, average_yearly_market_close_price: Decimal | None = None, average_daily_market_close_price: Decimal | None = None, realized_day_gain_date: date | None = None, realized_today_date: date | None = None)

Bases: TastytradeData

Dataclass containing imformation about an individual position in a portfolio.

Show JSON schema
{
   "title": "CurrentPosition",
   "description": "Dataclass containing imformation about an individual position in a\nportfolio.",
   "type": "object",
   "properties": {
      "account-number": {
         "title": "Account-Number",
         "type": "string"
      },
      "symbol": {
         "title": "Symbol",
         "type": "string"
      },
      "instrument-type": {
         "$ref": "#/$defs/InstrumentType"
      },
      "underlying-symbol": {
         "title": "Underlying-Symbol",
         "type": "string"
      },
      "quantity": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Quantity"
      },
      "quantity-direction": {
         "title": "Quantity-Direction",
         "type": "string"
      },
      "close-price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Close-Price"
      },
      "average-open-price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Average-Open-Price"
      },
      "multiplier": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Multiplier"
      },
      "cost-effect": {
         "title": "Cost-Effect",
         "type": "string"
      },
      "is-suppressed": {
         "title": "Is-Suppressed",
         "type": "boolean"
      },
      "is-frozen": {
         "title": "Is-Frozen",
         "type": "boolean"
      },
      "realized-day-gain": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Realized-Day-Gain"
      },
      "realized-today": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Realized-Today"
      },
      "created-at": {
         "format": "date-time",
         "title": "Created-At",
         "type": "string"
      },
      "updated-at": {
         "format": "date-time",
         "title": "Updated-At",
         "type": "string"
      },
      "mark": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Mark"
      },
      "mark-price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Mark-Price"
      },
      "restricted-quantity": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Restricted-Quantity"
      },
      "expires-at": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Expires-At"
      },
      "fixing-price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Fixing-Price"
      },
      "deliverable-type": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Deliverable-Type"
      },
      "average-yearly-market-close-price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Average-Yearly-Market-Close-Price"
      },
      "average-daily-market-close-price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Average-Daily-Market-Close-Price"
      },
      "realized-day-gain-date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Realized-Day-Gain-Date"
      },
      "realized-today-date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Realized-Today-Date"
      }
   },
   "$defs": {
      "InstrumentType": {
         "description": "Contains the valid types of instruments and their representation in the API.",
         "enum": [
            "Bond",
            "Cryptocurrency",
            "Currency Pair",
            "Equity",
            "Equity Offering",
            "Equity Option",
            "Fixed Income Security",
            "Future",
            "Future Option",
            "Index",
            "Liquidity Pool",
            "Unknown",
            "Warrant"
         ],
         "title": "InstrumentType",
         "type": "string"
      }
   },
   "required": [
      "account-number",
      "symbol",
      "instrument-type",
      "underlying-symbol",
      "quantity",
      "quantity-direction",
      "close-price",
      "average-open-price",
      "multiplier",
      "cost-effect",
      "is-suppressed",
      "is-frozen",
      "realized-day-gain",
      "realized-today",
      "created-at",
      "updated-at"
   ]
}

Fields:
Validators:
field account_number : str [Required] (alias 'account-number')
Validated by:
field average_daily_market_close_price : Decimal | None = None (alias 'average-daily-market-close-price')
Validated by:
field average_open_price : Decimal [Required] (alias 'average-open-price')
Validated by:
field average_yearly_market_close_price : Decimal | None = None (alias 'average-yearly-market-close-price')
Validated by:
field close_price : Decimal [Required] (alias 'close-price')
Validated by:
field cost_effect : str [Required] (alias 'cost-effect')
Validated by:
field created_at : datetime [Required] (alias 'created-at')
Validated by:
field deliverable_type : str | None = None (alias 'deliverable-type')
Validated by:
field expires_at : datetime | None = None (alias 'expires-at')
Validated by:
field fixing_price : Decimal | None = None (alias 'fixing-price')
Validated by:
field instrument_type : InstrumentType [Required] (alias 'instrument-type')
Validated by:
field is_frozen : bool [Required] (alias 'is-frozen')
Validated by:
field is_suppressed : bool [Required] (alias 'is-suppressed')
Validated by:
field mark : Decimal | None = None
Validated by:
field mark_price : Decimal | None = None (alias 'mark-price')
Validated by:
field multiplier : Decimal [Required]
Validated by:
field quantity : Decimal [Required]
Validated by:
field quantity_direction : str [Required] (alias 'quantity-direction')
Validated by:
field realized_day_gain : Decimal [Required] (alias 'realized-day-gain')
Validated by:
field realized_day_gain_date : date | None = None (alias 'realized-day-gain-date')
Validated by:
field realized_today : Decimal [Required] (alias 'realized-today')
Validated by:
field realized_today_date : date | None = None (alias 'realized-today-date')
Validated by:
field restricted_quantity : Decimal | None = None (alias 'restricted-quantity')
Validated by:
field symbol : str [Required]
Validated by:
field underlying_symbol : str [Required] (alias 'underlying-symbol')
Validated by:
field updated_at : datetime [Required] (alias 'updated-at')
Validated by:
validator validate_price_effects  »  all fields
pydantic model tastytrade.account.EmptyDict

Bases: BaseModel

Show JSON schema
{
   "title": "EmptyDict",
   "type": "object",
   "properties": {},
   "additionalProperties": false
}

pydantic model tastytrade.account.FeesInfo(*, total_fees: Decimal)

Bases: TastytradeData

Show JSON schema
{
   "title": "FeesInfo",
   "type": "object",
   "properties": {
      "total-fees": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Total-Fees"
      }
   },
   "required": [
      "total-fees"
   ]
}

Fields:
Validators:
field total_fees : Decimal [Required] (alias 'total-fees')
Validated by:
validator validate_price_effects  »  all fields
pydantic model tastytrade.account.Lot(*, id: str, transaction_id: int, quantity: Decimal, price: Decimal, quantity_direction: str, executed_at: datetime, transaction_date: date)

Bases: TastytradeData

Dataclass containing information about the lot of a position.

Show JSON schema
{
   "title": "Lot",
   "description": "Dataclass containing information about the lot of a position.",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "string"
      },
      "transaction-id": {
         "title": "Transaction-Id",
         "type": "integer"
      },
      "quantity": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Quantity"
      },
      "price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Price"
      },
      "quantity-direction": {
         "title": "Quantity-Direction",
         "type": "string"
      },
      "executed-at": {
         "format": "date-time",
         "title": "Executed-At",
         "type": "string"
      },
      "transaction-date": {
         "format": "date",
         "title": "Transaction-Date",
         "type": "string"
      }
   },
   "required": [
      "id",
      "transaction-id",
      "quantity",
      "price",
      "quantity-direction",
      "executed-at",
      "transaction-date"
   ]
}

Fields:
field executed_at : datetime [Required] (alias 'executed-at')
field id : str [Required]
field price : Decimal [Required]
field quantity : Decimal [Required]
field quantity_direction : str [Required] (alias 'quantity-direction')
field transaction_date : date [Required] (alias 'transaction-date')
field transaction_id : int [Required] (alias 'transaction-id')
pydantic model tastytrade.account.MarginReport(*, account_number: str, description: str, margin_calculation_type: str, option_level: str, margin_requirement: Decimal, maintenance_requirement: Decimal, margin_equity: Decimal, option_buying_power: Decimal, reg_t_margin_requirement: Decimal, reg_t_option_buying_power: Decimal, maintenance_excess: Decimal, last_state_timestamp: int, groups: list[MarginReportEntry | EmptyDict], initial_requirement: Decimal | None = None)

Bases: TastytradeData

Dataclass containing an overall portfolio margin report.

Show JSON schema
{
   "title": "MarginReport",
   "description": "Dataclass containing an overall portfolio margin report.",
   "type": "object",
   "properties": {
      "account-number": {
         "title": "Account-Number",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "margin-calculation-type": {
         "title": "Margin-Calculation-Type",
         "type": "string"
      },
      "option-level": {
         "title": "Option-Level",
         "type": "string"
      },
      "margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Margin-Requirement"
      },
      "maintenance-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Maintenance-Requirement"
      },
      "margin-equity": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Margin-Equity"
      },
      "option-buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Option-Buying-Power"
      },
      "reg-t-margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Reg-T-Margin-Requirement"
      },
      "reg-t-option-buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Reg-T-Option-Buying-Power"
      },
      "maintenance-excess": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Maintenance-Excess"
      },
      "last-state-timestamp": {
         "title": "Last-State-Timestamp",
         "type": "integer"
      },
      "groups": {
         "items": {
            "anyOf": [
               {
                  "$ref": "#/$defs/MarginReportEntry"
               },
               {
                  "$ref": "#/$defs/EmptyDict"
               }
            ]
         },
         "title": "Groups",
         "type": "array"
      },
      "initial-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Initial-Requirement"
      }
   },
   "$defs": {
      "EmptyDict": {
         "additionalProperties": false,
         "properties": {},
         "title": "EmptyDict",
         "type": "object"
      },
      "MarginReportEntry": {
         "description": "Dataclass containing an individual entry (relating to a specific position)\nas part of the overall margin report.",
         "properties": {
            "description": {
               "title": "Description",
               "type": "string"
            },
            "code": {
               "title": "Code",
               "type": "string"
            },
            "buying-power": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Buying-Power"
            },
            "margin-calculation-type": {
               "title": "Margin-Calculation-Type",
               "type": "string"
            },
            "margin-requirement": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Margin-Requirement"
            },
            "expected-price-range-up-percent": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Expected-Price-Range-Up-Percent"
            },
            "expected-price-range-down-percent": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Expected-Price-Range-Down-Percent"
            },
            "groups": {
               "anyOf": [
                  {
                     "items": {
                        "additionalProperties": true,
                        "type": "object"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Groups"
            },
            "initial-requirement": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Initial-Requirement"
            },
            "maintenance-requirement": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maintenance-Requirement"
            },
            "point-of-no-return-percent": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Point-Of-No-Return-Percent"
            },
            "price-increase-percent": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Price-Increase-Percent"
            },
            "price-decrease-percent": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Price-Decrease-Percent"
            },
            "underlying-symbol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Underlying-Symbol"
            },
            "underlying-type": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Underlying-Type"
            }
         },
         "required": [
            "description",
            "code",
            "buying-power",
            "margin-calculation-type",
            "margin-requirement"
         ],
         "title": "MarginReportEntry",
         "type": "object"
      }
   },
   "required": [
      "account-number",
      "description",
      "margin-calculation-type",
      "option-level",
      "margin-requirement",
      "maintenance-requirement",
      "margin-equity",
      "option-buying-power",
      "reg-t-margin-requirement",
      "reg-t-option-buying-power",
      "maintenance-excess",
      "last-state-timestamp",
      "groups"
   ]
}

Fields:
Validators:
field account_number : str [Required] (alias 'account-number')
Validated by:
field description : str [Required]
Validated by:
field groups : list[MarginReportEntry | EmptyDict] [Required]
Validated by:
field initial_requirement : Decimal | None = None (alias 'initial-requirement')
Validated by:
field last_state_timestamp : int [Required] (alias 'last-state-timestamp')
Validated by:
field maintenance_excess : Decimal [Required] (alias 'maintenance-excess')
Validated by:
field maintenance_requirement : Decimal [Required] (alias 'maintenance-requirement')
Validated by:
field margin_calculation_type : str [Required] (alias 'margin-calculation-type')
Validated by:
field margin_equity : Decimal [Required] (alias 'margin-equity')
Validated by:
field margin_requirement : Decimal [Required] (alias 'margin-requirement')
Validated by:
field option_buying_power : Decimal [Required] (alias 'option-buying-power')
Validated by:
field option_level : str [Required] (alias 'option-level')
Validated by:
field reg_t_margin_requirement : Decimal [Required] (alias 'reg-t-margin-requirement')
Validated by:
field reg_t_option_buying_power : Decimal [Required] (alias 'reg-t-option-buying-power')
Validated by:
validator validate_price_effects  »  all fields
pydantic model tastytrade.account.MarginReportEntry(*, description: str, code: str, buying_power: Decimal, margin_calculation_type: str, margin_requirement: Decimal, expected_price_range_up_percent: Decimal | None = None, expected_price_range_down_percent: Decimal | None = None, groups: list[dict[str, Any]] | None = None, initial_requirement: Decimal | None = None, maintenance_requirement: Decimal | None = None, point_of_no_return_percent: Decimal | None = None, price_increase_percent: Decimal | None = None, price_decrease_percent: Decimal | None = None, underlying_symbol: str | None = None, underlying_type: str | None = None)

Bases: TastytradeData

Dataclass containing an individual entry (relating to a specific position) as part of the overall margin report.

Show JSON schema
{
   "title": "MarginReportEntry",
   "description": "Dataclass containing an individual entry (relating to a specific position)\nas part of the overall margin report.",
   "type": "object",
   "properties": {
      "description": {
         "title": "Description",
         "type": "string"
      },
      "code": {
         "title": "Code",
         "type": "string"
      },
      "buying-power": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Buying-Power"
      },
      "margin-calculation-type": {
         "title": "Margin-Calculation-Type",
         "type": "string"
      },
      "margin-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Margin-Requirement"
      },
      "expected-price-range-up-percent": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Expected-Price-Range-Up-Percent"
      },
      "expected-price-range-down-percent": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Expected-Price-Range-Down-Percent"
      },
      "groups": {
         "anyOf": [
            {
               "items": {
                  "additionalProperties": true,
                  "type": "object"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Groups"
      },
      "initial-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Initial-Requirement"
      },
      "maintenance-requirement": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Maintenance-Requirement"
      },
      "point-of-no-return-percent": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Point-Of-No-Return-Percent"
      },
      "price-increase-percent": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Price-Increase-Percent"
      },
      "price-decrease-percent": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Price-Decrease-Percent"
      },
      "underlying-symbol": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Underlying-Symbol"
      },
      "underlying-type": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Underlying-Type"
      }
   },
   "required": [
      "description",
      "code",
      "buying-power",
      "margin-calculation-type",
      "margin-requirement"
   ]
}

Fields:
Validators:
field buying_power : Decimal [Required] (alias 'buying-power')
Validated by:
field code : str [Required]
Validated by:
field description : str [Required]
Validated by:
field expected_price_range_down_percent : Decimal | None = None (alias 'expected-price-range-down-percent')
Validated by:
field expected_price_range_up_percent : Decimal | None = None (alias 'expected-price-range-up-percent')
Validated by:
field groups : list[dict[str, Any]] | None = None
Validated by:
field initial_requirement : Decimal | None = None (alias 'initial-requirement')
Validated by:
field maintenance_requirement : Decimal | None = None (alias 'maintenance-requirement')
Validated by:
field margin_calculation_type : str [Required] (alias 'margin-calculation-type')
Validated by:
field margin_requirement : Decimal [Required] (alias 'margin-requirement')
Validated by:
field point_of_no_return_percent : Decimal | None = None (alias 'point-of-no-return-percent')
Validated by:
field price_decrease_percent : Decimal | None = None (alias 'price-decrease-percent')
Validated by:
field price_increase_percent : Decimal | None = None (alias 'price-increase-percent')
Validated by:
field underlying_symbol : str | None = None (alias 'underlying-symbol')
Validated by:
field underlying_type : str | None = None (alias 'underlying-type')
Validated by:
validator validate_price_effects  »  all fields
pydantic model tastytrade.account.NetLiqOhlc(*, open: Decimal, high: Decimal, low: Decimal, close: Decimal, pending_cash_open: Decimal, pending_cash_high: Decimal, pending_cash_low: Decimal, pending_cash_close: Decimal, total_open: Decimal, total_high: Decimal, total_low: Decimal, total_close: Decimal, time: str)

Bases: TastytradeData

Dataclass containing historical net liquidation data in OHLC format (open, high, low, close), with a timestamp.

Show JSON schema
{
   "title": "NetLiqOhlc",
   "description": "Dataclass containing historical net liquidation data in OHLC format\n(open, high, low, close), with a timestamp.",
   "type": "object",
   "properties": {
      "open": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Open"
      },
      "high": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "High"
      },
      "low": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Low"
      },
      "close": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Close"
      },
      "pending-cash-open": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Pending-Cash-Open"
      },
      "pending-cash-high": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Pending-Cash-High"
      },
      "pending-cash-low": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Pending-Cash-Low"
      },
      "pending-cash-close": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Pending-Cash-Close"
      },
      "total-open": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Total-Open"
      },
      "total-high": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Total-High"
      },
      "total-low": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Total-Low"
      },
      "total-close": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Total-Close"
      },
      "time": {
         "title": "Time",
         "type": "string"
      }
   },
   "required": [
      "open",
      "high",
      "low",
      "close",
      "pending-cash-open",
      "pending-cash-high",
      "pending-cash-low",
      "pending-cash-close",
      "total-open",
      "total-high",
      "total-low",
      "total-close",
      "time"
   ]
}

Fields:
field close : Decimal [Required]
field high : Decimal [Required]
field low : Decimal [Required]
field open : Decimal [Required]
field pending_cash_close : Decimal [Required] (alias 'pending-cash-close')
field pending_cash_high : Decimal [Required] (alias 'pending-cash-high')
field pending_cash_low : Decimal [Required] (alias 'pending-cash-low')
field pending_cash_open : Decimal [Required] (alias 'pending-cash-open')
field time : str [Required]
field total_close : Decimal [Required] (alias 'total-close')
field total_high : Decimal [Required] (alias 'total-high')
field total_low : Decimal [Required] (alias 'total-low')
field total_open : Decimal [Required] (alias 'total-open')
pydantic model tastytrade.account.TradingStatus(*, account_number: str, equities_margin_calculation_type: str, fee_schedule_name: str, futures_margin_rate_multiplier: Decimal, has_intraday_equities_margin: bool, id: int, is_aggregated_at_clearing: bool, is_closed: bool, is_closing_only: bool, is_cryptocurrency_enabled: bool, is_frozen: bool, is_full_equity_margin_required: bool, is_futures_closing_only: bool, is_futures_intra_day_enabled: bool, is_futures_enabled: bool, is_in_day_trade_equity_maintenance_call: bool, is_in_margin_call: bool, is_pattern_day_trader: bool, is_small_notional_futures_intra_day_enabled: bool, is_roll_the_day_forward_enabled: bool, are_far_otm_net_options_restricted: bool, options_level: str, short_calls_enabled: bool, small_notional_futures_margin_rate_multiplier: Decimal, is_equity_offering_enabled: bool, is_equity_offering_closing_only: bool, updated_at: datetime, is_portfolio_margin_enabled: bool | None = None, is_risk_reducing_only: bool | None = None, day_trade_count: int | None = None, autotrade_account_type: str | None = None, clearing_account_number: str | None = None, clearing_aggregation_identifier: str | None = None, is_cryptocurrency_closing_only: bool | None = None, pdt_reset_on: date | None = None, cmta_override: int | None = None, enhanced_fraud_safeguards_enabled_at: datetime | None = None)

Bases: TastytradeData

Dataclass containing information about an account’s trading status, such as what types of trades are allowed (e.g. margin, crypto, futures)

Show JSON schema
{
   "title": "TradingStatus",
   "description": "Dataclass containing information about an account's trading status, such\nas what types of trades are allowed (e.g. margin, crypto, futures)",
   "type": "object",
   "properties": {
      "account-number": {
         "title": "Account-Number",
         "type": "string"
      },
      "equities-margin-calculation-type": {
         "title": "Equities-Margin-Calculation-Type",
         "type": "string"
      },
      "fee-schedule-name": {
         "title": "Fee-Schedule-Name",
         "type": "string"
      },
      "futures-margin-rate-multiplier": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Futures-Margin-Rate-Multiplier"
      },
      "has-intraday-equities-margin": {
         "title": "Has-Intraday-Equities-Margin",
         "type": "boolean"
      },
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "is-aggregated-at-clearing": {
         "title": "Is-Aggregated-At-Clearing",
         "type": "boolean"
      },
      "is-closed": {
         "title": "Is-Closed",
         "type": "boolean"
      },
      "is-closing-only": {
         "title": "Is-Closing-Only",
         "type": "boolean"
      },
      "is-cryptocurrency-enabled": {
         "title": "Is-Cryptocurrency-Enabled",
         "type": "boolean"
      },
      "is-frozen": {
         "title": "Is-Frozen",
         "type": "boolean"
      },
      "is-full-equity-margin-required": {
         "title": "Is-Full-Equity-Margin-Required",
         "type": "boolean"
      },
      "is-futures-closing-only": {
         "title": "Is-Futures-Closing-Only",
         "type": "boolean"
      },
      "is-futures-intra-day-enabled": {
         "title": "Is-Futures-Intra-Day-Enabled",
         "type": "boolean"
      },
      "is-futures-enabled": {
         "title": "Is-Futures-Enabled",
         "type": "boolean"
      },
      "is-in-day-trade-equity-maintenance-call": {
         "title": "Is-In-Day-Trade-Equity-Maintenance-Call",
         "type": "boolean"
      },
      "is-in-margin-call": {
         "title": "Is-In-Margin-Call",
         "type": "boolean"
      },
      "is-pattern-day-trader": {
         "title": "Is-Pattern-Day-Trader",
         "type": "boolean"
      },
      "is-small-notional-futures-intra-day-enabled": {
         "title": "Is-Small-Notional-Futures-Intra-Day-Enabled",
         "type": "boolean"
      },
      "is-roll-the-day-forward-enabled": {
         "title": "Is-Roll-The-Day-Forward-Enabled",
         "type": "boolean"
      },
      "are-far-otm-net-options-restricted": {
         "title": "Are-Far-Otm-Net-Options-Restricted",
         "type": "boolean"
      },
      "options-level": {
         "title": "Options-Level",
         "type": "string"
      },
      "short-calls-enabled": {
         "title": "Short-Calls-Enabled",
         "type": "boolean"
      },
      "small-notional-futures-margin-rate-multiplier": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Small-Notional-Futures-Margin-Rate-Multiplier"
      },
      "is-equity-offering-enabled": {
         "title": "Is-Equity-Offering-Enabled",
         "type": "boolean"
      },
      "is-equity-offering-closing-only": {
         "title": "Is-Equity-Offering-Closing-Only",
         "type": "boolean"
      },
      "updated-at": {
         "format": "date-time",
         "title": "Updated-At",
         "type": "string"
      },
      "is-portfolio-margin-enabled": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Is-Portfolio-Margin-Enabled"
      },
      "is-risk-reducing-only": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Is-Risk-Reducing-Only"
      },
      "day-trade-count": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Day-Trade-Count"
      },
      "autotrade-account-type": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Autotrade-Account-Type"
      },
      "clearing-account-number": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Clearing-Account-Number"
      },
      "clearing-aggregation-identifier": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Clearing-Aggregation-Identifier"
      },
      "is-cryptocurrency-closing-only": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Is-Cryptocurrency-Closing-Only"
      },
      "pdt-reset-on": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Pdt-Reset-On"
      },
      "cmta-override": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Cmta-Override"
      },
      "enhanced-fraud-safeguards-enabled-at": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Enhanced-Fraud-Safeguards-Enabled-At"
      }
   },
   "required": [
      "account-number",
      "equities-margin-calculation-type",
      "fee-schedule-name",
      "futures-margin-rate-multiplier",
      "has-intraday-equities-margin",
      "id",
      "is-aggregated-at-clearing",
      "is-closed",
      "is-closing-only",
      "is-cryptocurrency-enabled",
      "is-frozen",
      "is-full-equity-margin-required",
      "is-futures-closing-only",
      "is-futures-intra-day-enabled",
      "is-futures-enabled",
      "is-in-day-trade-equity-maintenance-call",
      "is-in-margin-call",
      "is-pattern-day-trader",
      "is-small-notional-futures-intra-day-enabled",
      "is-roll-the-day-forward-enabled",
      "are-far-otm-net-options-restricted",
      "options-level",
      "short-calls-enabled",
      "small-notional-futures-margin-rate-multiplier",
      "is-equity-offering-enabled",
      "is-equity-offering-closing-only",
      "updated-at"
   ]
}

Fields:
field account_number : str [Required] (alias 'account-number')
field are_far_otm_net_options_restricted : bool [Required] (alias 'are-far-otm-net-options-restricted')
field autotrade_account_type : str | None = None (alias 'autotrade-account-type')
field clearing_account_number : str | None = None (alias 'clearing-account-number')
field clearing_aggregation_identifier : str | None = None (alias 'clearing-aggregation-identifier')
field cmta_override : int | None = None (alias 'cmta-override')
field day_trade_count : int | None = None (alias 'day-trade-count')
field enhanced_fraud_safeguards_enabled_at : datetime | None = None (alias 'enhanced-fraud-safeguards-enabled-at')
field equities_margin_calculation_type : str [Required] (alias 'equities-margin-calculation-type')
field fee_schedule_name : str [Required] (alias 'fee-schedule-name')
field futures_margin_rate_multiplier : Decimal [Required] (alias 'futures-margin-rate-multiplier')
field has_intraday_equities_margin : bool [Required] (alias 'has-intraday-equities-margin')
field id : int [Required]
field is_aggregated_at_clearing : bool [Required] (alias 'is-aggregated-at-clearing')
field is_closed : bool [Required] (alias 'is-closed')
field is_closing_only : bool [Required] (alias 'is-closing-only')
field is_cryptocurrency_closing_only : bool | None = None (alias 'is-cryptocurrency-closing-only')
field is_cryptocurrency_enabled : bool [Required] (alias 'is-cryptocurrency-enabled')
field is_equity_offering_closing_only : bool [Required] (alias 'is-equity-offering-closing-only')
field is_equity_offering_enabled : bool [Required] (alias 'is-equity-offering-enabled')
field is_frozen : bool [Required] (alias 'is-frozen')
field is_full_equity_margin_required : bool [Required] (alias 'is-full-equity-margin-required')
field is_futures_closing_only : bool [Required] (alias 'is-futures-closing-only')
field is_futures_enabled : bool [Required] (alias 'is-futures-enabled')
field is_futures_intra_day_enabled : bool [Required] (alias 'is-futures-intra-day-enabled')
field is_in_day_trade_equity_maintenance_call : bool [Required] (alias 'is-in-day-trade-equity-maintenance-call')
field is_in_margin_call : bool [Required] (alias 'is-in-margin-call')
field is_pattern_day_trader : bool [Required] (alias 'is-pattern-day-trader')
field is_portfolio_margin_enabled : bool | None = None (alias 'is-portfolio-margin-enabled')
field is_risk_reducing_only : bool | None = None (alias 'is-risk-reducing-only')
field is_roll_the_day_forward_enabled : bool [Required] (alias 'is-roll-the-day-forward-enabled')
field is_small_notional_futures_intra_day_enabled : bool [Required] (alias 'is-small-notional-futures-intra-day-enabled')
field options_level : str [Required] (alias 'options-level')
field pdt_reset_on : date | None = None (alias 'pdt-reset-on')
field short_calls_enabled : bool [Required] (alias 'short-calls-enabled')
field small_notional_futures_margin_rate_multiplier : Decimal [Required] (alias 'small-notional-futures-margin-rate-multiplier')
field updated_at : datetime [Required] (alias 'updated-at')
pydantic model tastytrade.account.Transaction(*, id: int, account_number: str, transaction_type: str, transaction_sub_type: str, description: str, executed_at: datetime, transaction_date: date, value: Decimal, net_value: Decimal, is_estimated_fee: bool, symbol: str | None = None, instrument_type: InstrumentType | None = None, underlying_symbol: str | None = None, action: OrderAction | None = None, quantity: Decimal | None = None, price: Decimal | None = None, regulatory_fees: Decimal | None = None, clearing_fees: Decimal | None = None, commission: Decimal | None = None, proprietary_index_option_fees: Decimal | None = None, ext_exchange_order_number: str | None = None, ext_global_order_number: int | None = None, ext_group_id: str | None = None, ext_group_fill_id: str | None = None, ext_exec_id: str | None = None, exec_id: str | None = None, exchange: str | None = None, order_id: int | None = None, exchange_affiliation_identifier: str | None = None, leg_count: int | None = None, destination_venue: str | None = None, other_charge: Decimal | None = None, other_charge_description: str | None = None, reverses_id: int | None = None, cost_basis_reconciliation_date: date | None = None, lots: list[Lot] | None = None, agency_price: Decimal | None = None, principal_price: Decimal | None = None)

Bases: TastytradeData

Dataclass containing information about a past transaction.

Show JSON schema
{
   "title": "Transaction",
   "description": "Dataclass containing information about a past transaction.",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "account-number": {
         "title": "Account-Number",
         "type": "string"
      },
      "transaction-type": {
         "title": "Transaction-Type",
         "type": "string"
      },
      "transaction-sub-type": {
         "title": "Transaction-Sub-Type",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "executed-at": {
         "format": "date-time",
         "title": "Executed-At",
         "type": "string"
      },
      "transaction-date": {
         "format": "date",
         "title": "Transaction-Date",
         "type": "string"
      },
      "value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Value"
      },
      "net-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Net-Value"
      },
      "is-estimated-fee": {
         "title": "Is-Estimated-Fee",
         "type": "boolean"
      },
      "symbol": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Symbol"
      },
      "instrument-type": {
         "anyOf": [
            {
               "$ref": "#/$defs/InstrumentType"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "underlying-symbol": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Underlying-Symbol"
      },
      "action": {
         "anyOf": [
            {
               "$ref": "#/$defs/OrderAction"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "quantity": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Quantity"
      },
      "price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Price"
      },
      "regulatory-fees": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Regulatory-Fees"
      },
      "clearing-fees": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Clearing-Fees"
      },
      "commission": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Commission"
      },
      "proprietary-index-option-fees": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Proprietary-Index-Option-Fees"
      },
      "ext-exchange-order-number": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ext-Exchange-Order-Number"
      },
      "ext-global-order-number": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ext-Global-Order-Number"
      },
      "ext-group-id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ext-Group-Id"
      },
      "ext-group-fill-id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ext-Group-Fill-Id"
      },
      "ext-exec-id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ext-Exec-Id"
      },
      "exec-id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Exec-Id"
      },
      "exchange": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Exchange"
      },
      "order-id": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Order-Id"
      },
      "exchange-affiliation-identifier": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Exchange-Affiliation-Identifier"
      },
      "leg-count": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Leg-Count"
      },
      "destination-venue": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Destination-Venue"
      },
      "other-charge": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Other-Charge"
      },
      "other-charge-description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Other-Charge-Description"
      },
      "reverses-id": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Reverses-Id"
      },
      "cost-basis-reconciliation-date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Cost-Basis-Reconciliation-Date"
      },
      "lots": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/Lot"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Lots"
      },
      "agency-price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Agency-Price"
      },
      "principal-price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Principal-Price"
      }
   },
   "$defs": {
      "InstrumentType": {
         "description": "Contains the valid types of instruments and their representation in the API.",
         "enum": [
            "Bond",
            "Cryptocurrency",
            "Currency Pair",
            "Equity",
            "Equity Offering",
            "Equity Option",
            "Fixed Income Security",
            "Future",
            "Future Option",
            "Index",
            "Liquidity Pool",
            "Unknown",
            "Warrant"
         ],
         "title": "InstrumentType",
         "type": "string"
      },
      "Lot": {
         "description": "Dataclass containing information about the lot of a position.",
         "properties": {
            "id": {
               "title": "Id",
               "type": "string"
            },
            "transaction-id": {
               "title": "Transaction-Id",
               "type": "integer"
            },
            "quantity": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Quantity"
            },
            "price": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Price"
            },
            "quantity-direction": {
               "title": "Quantity-Direction",
               "type": "string"
            },
            "executed-at": {
               "format": "date-time",
               "title": "Executed-At",
               "type": "string"
            },
            "transaction-date": {
               "format": "date",
               "title": "Transaction-Date",
               "type": "string"
            }
         },
         "required": [
            "id",
            "transaction-id",
            "quantity",
            "price",
            "quantity-direction",
            "executed-at",
            "transaction-date"
         ],
         "title": "Lot",
         "type": "object"
      },
      "OrderAction": {
         "description": "Contains the valid order actions.",
         "enum": [
            "Buy to Open",
            "Buy to Close",
            "Sell to Open",
            "Sell to Close",
            "Buy",
            "Sell"
         ],
         "title": "OrderAction",
         "type": "string"
      }
   },
   "required": [
      "id",
      "account-number",
      "transaction-type",
      "transaction-sub-type",
      "description",
      "executed-at",
      "transaction-date",
      "value",
      "net-value",
      "is-estimated-fee"
   ]
}

Fields:
Validators:
field account_number : str [Required] (alias 'account-number')
Validated by:
field action : OrderAction | None = None
Validated by:
field agency_price : Decimal | None = None (alias 'agency-price')
Validated by:
field clearing_fees : Decimal | None = None (alias 'clearing-fees')
Validated by:
field commission : Decimal | None = None
Validated by:
field cost_basis_reconciliation_date : date | None = None (alias 'cost-basis-reconciliation-date')
Validated by:
field description : str [Required]
Validated by:
field destination_venue : str | None = None (alias 'destination-venue')
Validated by:
field exchange : str | None = None
Validated by:
field exchange_affiliation_identifier : str | None = None (alias 'exchange-affiliation-identifier')
Validated by:
field exec_id : str | None = None (alias 'exec-id')
Validated by:
field executed_at : datetime [Required] (alias 'executed-at')
Validated by:
field ext_exchange_order_number : str | None = None (alias 'ext-exchange-order-number')
Validated by:
field ext_exec_id : str | None = None (alias 'ext-exec-id')
Validated by:
field ext_global_order_number : int | None = None (alias 'ext-global-order-number')
Validated by:
field ext_group_fill_id : str | None = None (alias 'ext-group-fill-id')
Validated by:
field ext_group_id : str | None = None (alias 'ext-group-id')
Validated by:
field id : int [Required]
Validated by:
field instrument_type : InstrumentType | None = None (alias 'instrument-type')
Validated by:
field is_estimated_fee : bool [Required] (alias 'is-estimated-fee')
Validated by:
field leg_count : int | None = None (alias 'leg-count')
Validated by:
field lots : list[Lot] | None = None
Validated by:
field net_value : Decimal [Required] (alias 'net-value')
Validated by:
field order_id : int | None = None (alias 'order-id')
Validated by:
field other_charge : Decimal | None = None (alias 'other-charge')
Validated by:
field other_charge_description : str | None = None (alias 'other-charge-description')
Validated by:
field price : Decimal | None = None
Validated by:
field principal_price : Decimal | None = None (alias 'principal-price')
Validated by:
field proprietary_index_option_fees : Decimal | None = None (alias 'proprietary-index-option-fees')
Validated by:
field quantity : Decimal | None = None
Validated by:
field regulatory_fees : Decimal | None = None (alias 'regulatory-fees')
Validated by:
field reverses_id : int | None = None (alias 'reverses-id')
Validated by:
field symbol : str | None = None
Validated by:
field transaction_date : date [Required] (alias 'transaction-date')
Validated by:
field transaction_sub_type : str [Required] (alias 'transaction-sub-type')
Validated by:
field transaction_type : str [Required] (alias 'transaction-type')
Validated by:
field underlying_symbol : str | None = None (alias 'underlying-symbol')
Validated by:
field value : Decimal [Required]
Validated by:
validator validate_price_effects  »  all fields