tastytrade.session

pydantic model tastytrade.session.Address(*, city: str, country: str, is_domestic: bool, is_foreign: bool, postal_code: str, state_region: str, street_one: str, street_two: str | None = None, street_three: str | None = None)

Bases: TastytradeData

Dataclass containing customer address information.

Show JSON schema
{
   "title": "Address",
   "description": "Dataclass containing customer address information.",
   "type": "object",
   "properties": {
      "city": {
         "title": "City",
         "type": "string"
      },
      "country": {
         "title": "Country",
         "type": "string"
      },
      "is-domestic": {
         "title": "Is-Domestic",
         "type": "boolean"
      },
      "is-foreign": {
         "title": "Is-Foreign",
         "type": "boolean"
      },
      "postal-code": {
         "title": "Postal-Code",
         "type": "string"
      },
      "state-region": {
         "title": "State-Region",
         "type": "string"
      },
      "street-one": {
         "title": "Street-One",
         "type": "string"
      },
      "street-two": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Street-Two"
      },
      "street-three": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Street-Three"
      }
   },
   "required": [
      "city",
      "country",
      "is-domestic",
      "is-foreign",
      "postal-code",
      "state-region",
      "street-one"
   ]
}

Fields:
field city : str [Required]
field country : str [Required]
field is_domestic : bool [Required] (alias 'is-domestic')
field is_foreign : bool [Required] (alias 'is-foreign')
field postal_code : str [Required] (alias 'postal-code')
field state_region : str [Required] (alias 'state-region')
field street_one : str [Required] (alias 'street-one')
field street_three : str | None = None (alias 'street-three')
field street_two : str | None = None (alias 'street-two')
pydantic model tastytrade.session.Customer(*, id: str, first_name: str, last_name: str, address: Address, mailing_address: Address, is_foreign: bool, usa_citizenship_type: str, mobile_phone_number: str, birth_date: date, email: str, tax_number_type: str, subject_to_tax_withholding: bool, has_industry_affiliation: bool, has_listed_affiliation: bool, has_political_affiliation: bool, has_delayed_quotes: bool, has_pending_or_approved_application: bool, is_professional: bool, permitted_account_types: list[CustomerAccountType], created_at: datetime, first_surname: str | None = None, customer_suitability: CustomerSuitability | None = None, regulatory_domain: str | None = None, home_phone_number: str | None = None, work_phone_number: str | None = None, external_id: str | None = None, tax_number: str | None = None, citizenship_country: str | None = None, agreed_to_margining: bool | None = None, agreed_to_terms: bool | None = None, ext_crm_id: str | None = None, identifiable_type: str | None = None, person: CustomerPerson | None = None, gender: str | None = None, middle_name: str | None = None, prefix_name: str | None = None, second_surname: str | None = None, suffix_name: str | None = None, foreign_tax_number: str | None = None, birth_country: str | None = None, visa_expiration_date: date | None = None, visa_type: str | None = None, signature_of_agreement: bool | None = None, desk_customer_id: str | None = None, entity: CustomerEntity | None = None, family_member_names: str | None = None, has_institutional_assets: str | bool | None = None, industry_affiliation_firm: str | None = None, is_investment_adviser: bool | None = None, listed_affiliation_symbol: str | None = None, political_organization: str | None = None, user_id: str | None = None)

Bases: TastytradeData

Dataclass containing customer information.

Show JSON schema
{
   "title": "Customer",
   "description": "Dataclass containing customer information.",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "string"
      },
      "first-name": {
         "title": "First-Name",
         "type": "string"
      },
      "last-name": {
         "title": "Last-Name",
         "type": "string"
      },
      "address": {
         "$ref": "#/$defs/Address"
      },
      "mailing-address": {
         "$ref": "#/$defs/Address"
      },
      "is-foreign": {
         "title": "Is-Foreign",
         "type": "boolean"
      },
      "usa-citizenship-type": {
         "title": "Usa-Citizenship-Type",
         "type": "string"
      },
      "mobile-phone-number": {
         "title": "Mobile-Phone-Number",
         "type": "string"
      },
      "birth-date": {
         "format": "date",
         "title": "Birth-Date",
         "type": "string"
      },
      "email": {
         "title": "Email",
         "type": "string"
      },
      "tax-number-type": {
         "title": "Tax-Number-Type",
         "type": "string"
      },
      "subject-to-tax-withholding": {
         "title": "Subject-To-Tax-Withholding",
         "type": "boolean"
      },
      "has-industry-affiliation": {
         "title": "Has-Industry-Affiliation",
         "type": "boolean"
      },
      "has-listed-affiliation": {
         "title": "Has-Listed-Affiliation",
         "type": "boolean"
      },
      "has-political-affiliation": {
         "title": "Has-Political-Affiliation",
         "type": "boolean"
      },
      "has-delayed-quotes": {
         "title": "Has-Delayed-Quotes",
         "type": "boolean"
      },
      "has-pending-or-approved-application": {
         "title": "Has-Pending-Or-Approved-Application",
         "type": "boolean"
      },
      "is-professional": {
         "title": "Is-Professional",
         "type": "boolean"
      },
      "permitted-account-types": {
         "items": {
            "$ref": "#/$defs/CustomerAccountType"
         },
         "title": "Permitted-Account-Types",
         "type": "array"
      },
      "created-at": {
         "format": "date-time",
         "title": "Created-At",
         "type": "string"
      },
      "first-surname": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "First-Surname"
      },
      "customer-suitability": {
         "anyOf": [
            {
               "$ref": "#/$defs/CustomerSuitability"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "regulatory-domain": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Regulatory-Domain"
      },
      "home-phone-number": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Home-Phone-Number"
      },
      "work-phone-number": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Work-Phone-Number"
      },
      "external-id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "External-Id"
      },
      "tax-number": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Tax-Number"
      },
      "citizenship-country": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Citizenship-Country"
      },
      "agreed-to-margining": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Agreed-To-Margining"
      },
      "agreed-to-terms": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Agreed-To-Terms"
      },
      "ext-crm-id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ext-Crm-Id"
      },
      "identifiable-type": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Identifiable-Type"
      },
      "person": {
         "anyOf": [
            {
               "$ref": "#/$defs/CustomerPerson"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "gender": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Gender"
      },
      "middle-name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Middle-Name"
      },
      "prefix-name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Prefix-Name"
      },
      "second-surname": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Second-Surname"
      },
      "suffix-name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Suffix-Name"
      },
      "foreign-tax-number": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Foreign-Tax-Number"
      },
      "birth-country": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Birth-Country"
      },
      "visa-expiration-date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Visa-Expiration-Date"
      },
      "visa-type": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Visa-Type"
      },
      "signature-of-agreement": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Signature-Of-Agreement"
      },
      "desk-customer-id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Desk-Customer-Id"
      },
      "entity": {
         "anyOf": [
            {
               "$ref": "#/$defs/CustomerEntity"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "family-member-names": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Family-Member-Names"
      },
      "has-institutional-assets": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Has-Institutional-Assets"
      },
      "industry-affiliation-firm": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Industry-Affiliation-Firm"
      },
      "is-investment-adviser": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Is-Investment-Adviser"
      },
      "listed-affiliation-symbol": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Listed-Affiliation-Symbol"
      },
      "political-organization": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Political-Organization"
      },
      "user-id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "User-Id"
      }
   },
   "$defs": {
      "Address": {
         "description": "Dataclass containing customer address information.",
         "properties": {
            "city": {
               "title": "City",
               "type": "string"
            },
            "country": {
               "title": "Country",
               "type": "string"
            },
            "is-domestic": {
               "title": "Is-Domestic",
               "type": "boolean"
            },
            "is-foreign": {
               "title": "Is-Foreign",
               "type": "boolean"
            },
            "postal-code": {
               "title": "Postal-Code",
               "type": "string"
            },
            "state-region": {
               "title": "State-Region",
               "type": "string"
            },
            "street-one": {
               "title": "Street-One",
               "type": "string"
            },
            "street-two": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Street-Two"
            },
            "street-three": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Street-Three"
            }
         },
         "required": [
            "city",
            "country",
            "is-domestic",
            "is-foreign",
            "postal-code",
            "state-region",
            "street-one"
         ],
         "title": "Address",
         "type": "object"
      },
      "CustomerAccountMarginType": {
         "description": "Dataclass containing margin information for a customer account type.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "is-margin": {
               "title": "Is-Margin",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "is-margin"
         ],
         "title": "CustomerAccountMarginType",
         "type": "object"
      },
      "CustomerAccountType": {
         "description": "Dataclass containing information for a type of customer account.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "is-tax-advantaged": {
               "title": "Is-Tax-Advantaged",
               "type": "boolean"
            },
            "is-publicly-available": {
               "title": "Is-Publicly-Available",
               "type": "boolean"
            },
            "has-multiple-owners": {
               "title": "Has-Multiple-Owners",
               "type": "boolean"
            },
            "margin-types": {
               "items": {
                  "$ref": "#/$defs/CustomerAccountMarginType"
               },
               "title": "Margin-Types",
               "type": "array"
            }
         },
         "required": [
            "name",
            "description",
            "is-tax-advantaged",
            "is-publicly-available",
            "has-multiple-owners",
            "margin-types"
         ],
         "title": "CustomerAccountType",
         "type": "object"
      },
      "CustomerEntity": {
         "description": "Dataclass containing customer entity information.",
         "properties": {
            "id": {
               "title": "Id",
               "type": "string"
            },
            "address": {
               "$ref": "#/$defs/Address"
            },
            "business-nature": {
               "title": "Business-Nature",
               "type": "string"
            },
            "email": {
               "title": "Email",
               "type": "string"
            },
            "entity-officers": {
               "items": {
                  "$ref": "#/$defs/EntityOfficer"
               },
               "title": "Entity-Officers",
               "type": "array"
            },
            "entity-suitability": {
               "$ref": "#/$defs/EntitySuitability"
            },
            "entity-type": {
               "title": "Entity-Type",
               "type": "string"
            },
            "foreign-institution": {
               "title": "Foreign-Institution",
               "type": "string"
            },
            "grantor-birth-date": {
               "title": "Grantor-Birth-Date",
               "type": "string"
            },
            "grantor-email": {
               "title": "Grantor-Email",
               "type": "string"
            },
            "grantor-first-name": {
               "title": "Grantor-First-Name",
               "type": "string"
            },
            "grantor-last-name": {
               "title": "Grantor-Last-Name",
               "type": "string"
            },
            "grantor-middle-name": {
               "title": "Grantor-Middle-Name",
               "type": "string"
            },
            "grantor-tax-number": {
               "title": "Grantor-Tax-Number",
               "type": "string"
            },
            "has-foreign-bank-affiliation": {
               "title": "Has-Foreign-Bank-Affiliation",
               "type": "string"
            },
            "has-foreign-institution-affiliation": {
               "title": "Has-Foreign-Institution-Affiliation",
               "type": "string"
            },
            "is-domestic": {
               "title": "Is-Domestic",
               "type": "boolean"
            },
            "legal-name": {
               "title": "Legal-Name",
               "type": "string"
            },
            "phone-number": {
               "title": "Phone-Number",
               "type": "string"
            },
            "tax-number": {
               "title": "Tax-Number",
               "type": "string"
            }
         },
         "required": [
            "id",
            "address",
            "business-nature",
            "email",
            "entity-officers",
            "entity-suitability",
            "entity-type",
            "foreign-institution",
            "grantor-birth-date",
            "grantor-email",
            "grantor-first-name",
            "grantor-last-name",
            "grantor-middle-name",
            "grantor-tax-number",
            "has-foreign-bank-affiliation",
            "has-foreign-institution-affiliation",
            "is-domestic",
            "legal-name",
            "phone-number",
            "tax-number"
         ],
         "title": "CustomerEntity",
         "type": "object"
      },
      "CustomerPerson": {
         "description": "Dataclass containing customer person information.",
         "properties": {
            "external-id": {
               "title": "External-Id",
               "type": "string"
            },
            "first-name": {
               "title": "First-Name",
               "type": "string"
            },
            "last-name": {
               "title": "Last-Name",
               "type": "string"
            },
            "citizenship-country": {
               "title": "Citizenship-Country",
               "type": "string"
            },
            "usa-citizenship-type": {
               "title": "Usa-Citizenship-Type",
               "type": "string"
            },
            "employment-status": {
               "title": "Employment-Status",
               "type": "string"
            },
            "marital-status": {
               "title": "Marital-Status",
               "type": "string"
            },
            "number-of-dependents": {
               "title": "Number-Of-Dependents",
               "type": "integer"
            },
            "occupation": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Occupation"
            },
            "middle-name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Middle-Name"
            },
            "prefix-name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Prefix-Name"
            },
            "suffix-name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Suffix-Name"
            },
            "birth-country": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Birth-Country"
            },
            "birth-date": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Birth-Date"
            },
            "visa-expiration-date": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Visa-Expiration-Date"
            },
            "visa-type": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Visa-Type"
            },
            "employer-name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Employer-Name"
            },
            "job-title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Job-Title"
            }
         },
         "required": [
            "external-id",
            "first-name",
            "last-name",
            "citizenship-country",
            "usa-citizenship-type",
            "employment-status",
            "marital-status",
            "number-of-dependents"
         ],
         "title": "CustomerPerson",
         "type": "object"
      },
      "CustomerSuitability": {
         "description": "Dataclass containing customer suitability information.",
         "properties": {
            "id": {
               "title": "Id",
               "type": "integer"
            },
            "annual-net-income": {
               "title": "Annual-Net-Income",
               "type": "integer"
            },
            "covered-options-trading-experience": {
               "title": "Covered-Options-Trading-Experience",
               "type": "string"
            },
            "employment-status": {
               "title": "Employment-Status",
               "type": "string"
            },
            "futures-trading-experience": {
               "title": "Futures-Trading-Experience",
               "type": "string"
            },
            "liquid-net-worth": {
               "title": "Liquid-Net-Worth",
               "type": "integer"
            },
            "marital-status": {
               "title": "Marital-Status",
               "type": "string"
            },
            "net-worth": {
               "title": "Net-Worth",
               "type": "integer"
            },
            "number-of-dependents": {
               "title": "Number-Of-Dependents",
               "type": "integer"
            },
            "stock-trading-experience": {
               "title": "Stock-Trading-Experience",
               "type": "string"
            },
            "uncovered-options-trading-experience": {
               "title": "Uncovered-Options-Trading-Experience",
               "type": "string"
            },
            "customer-id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Customer-Id"
            },
            "employer-name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Employer-Name"
            },
            "job-title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Job-Title"
            },
            "occupation": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Occupation"
            },
            "tax-bracket": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Tax-Bracket"
            }
         },
         "required": [
            "id",
            "annual-net-income",
            "covered-options-trading-experience",
            "employment-status",
            "futures-trading-experience",
            "liquid-net-worth",
            "marital-status",
            "net-worth",
            "number-of-dependents",
            "stock-trading-experience",
            "uncovered-options-trading-experience"
         ],
         "title": "CustomerSuitability",
         "type": "object"
      },
      "EntityOfficer": {
         "description": "Dataclass containing entity officer information.",
         "properties": {
            "id": {
               "title": "Id",
               "type": "string"
            },
            "external-id": {
               "title": "External-Id",
               "type": "string"
            },
            "first-name": {
               "title": "First-Name",
               "type": "string"
            },
            "last-name": {
               "title": "Last-Name",
               "type": "string"
            },
            "middle-name": {
               "title": "Middle-Name",
               "type": "string"
            },
            "prefix-name": {
               "title": "Prefix-Name",
               "type": "string"
            },
            "suffix-name": {
               "title": "Suffix-Name",
               "type": "string"
            },
            "address": {
               "$ref": "#/$defs/Address"
            },
            "birth-country": {
               "title": "Birth-Country",
               "type": "string"
            },
            "birth-date": {
               "format": "date",
               "title": "Birth-Date",
               "type": "string"
            },
            "citizenship-country": {
               "title": "Citizenship-Country",
               "type": "string"
            },
            "email": {
               "title": "Email",
               "type": "string"
            },
            "employer-name": {
               "title": "Employer-Name",
               "type": "string"
            },
            "employment-status": {
               "title": "Employment-Status",
               "type": "string"
            },
            "home-phone-number": {
               "title": "Home-Phone-Number",
               "type": "string"
            },
            "is-foreign": {
               "title": "Is-Foreign",
               "type": "boolean"
            },
            "job-title": {
               "title": "Job-Title",
               "type": "string"
            },
            "marital-status": {
               "title": "Marital-Status",
               "type": "string"
            },
            "mobile-phone-number": {
               "title": "Mobile-Phone-Number",
               "type": "string"
            },
            "number-of-dependents": {
               "title": "Number-Of-Dependents",
               "type": "integer"
            },
            "occupation": {
               "title": "Occupation",
               "type": "string"
            },
            "owner-of-record": {
               "title": "Owner-Of-Record",
               "type": "boolean"
            },
            "relationship-to-entity": {
               "title": "Relationship-To-Entity",
               "type": "string"
            },
            "tax-number": {
               "title": "Tax-Number",
               "type": "string"
            },
            "tax-number-type": {
               "title": "Tax-Number-Type",
               "type": "string"
            },
            "usa-citizenship-type": {
               "title": "Usa-Citizenship-Type",
               "type": "string"
            },
            "visa-expiration-date": {
               "format": "date",
               "title": "Visa-Expiration-Date",
               "type": "string"
            },
            "visa-type": {
               "title": "Visa-Type",
               "type": "string"
            },
            "work-phone-number": {
               "title": "Work-Phone-Number",
               "type": "string"
            }
         },
         "required": [
            "id",
            "external-id",
            "first-name",
            "last-name",
            "middle-name",
            "prefix-name",
            "suffix-name",
            "address",
            "birth-country",
            "birth-date",
            "citizenship-country",
            "email",
            "employer-name",
            "employment-status",
            "home-phone-number",
            "is-foreign",
            "job-title",
            "marital-status",
            "mobile-phone-number",
            "number-of-dependents",
            "occupation",
            "owner-of-record",
            "relationship-to-entity",
            "tax-number",
            "tax-number-type",
            "usa-citizenship-type",
            "visa-expiration-date",
            "visa-type",
            "work-phone-number"
         ],
         "title": "EntityOfficer",
         "type": "object"
      },
      "EntitySuitability": {
         "description": "Dataclass containing entity suitability information.",
         "properties": {
            "id": {
               "title": "Id",
               "type": "string"
            },
            "annual-net-income": {
               "title": "Annual-Net-Income",
               "type": "integer"
            },
            "covered-options-trading-experience": {
               "title": "Covered-Options-Trading-Experience",
               "type": "string"
            },
            "entity-id": {
               "title": "Entity-Id",
               "type": "integer"
            },
            "futures-trading-experience": {
               "title": "Futures-Trading-Experience",
               "type": "string"
            },
            "liquid-net-worth": {
               "title": "Liquid-Net-Worth",
               "type": "integer"
            },
            "net-worth": {
               "title": "Net-Worth",
               "type": "integer"
            },
            "stock-trading-experience": {
               "title": "Stock-Trading-Experience",
               "type": "string"
            },
            "tax-bracket": {
               "title": "Tax-Bracket",
               "type": "string"
            },
            "uncovered-options-trading-experience": {
               "title": "Uncovered-Options-Trading-Experience",
               "type": "string"
            }
         },
         "required": [
            "id",
            "annual-net-income",
            "covered-options-trading-experience",
            "entity-id",
            "futures-trading-experience",
            "liquid-net-worth",
            "net-worth",
            "stock-trading-experience",
            "tax-bracket",
            "uncovered-options-trading-experience"
         ],
         "title": "EntitySuitability",
         "type": "object"
      }
   },
   "required": [
      "id",
      "first-name",
      "last-name",
      "address",
      "mailing-address",
      "is-foreign",
      "usa-citizenship-type",
      "mobile-phone-number",
      "birth-date",
      "email",
      "tax-number-type",
      "subject-to-tax-withholding",
      "has-industry-affiliation",
      "has-listed-affiliation",
      "has-political-affiliation",
      "has-delayed-quotes",
      "has-pending-or-approved-application",
      "is-professional",
      "permitted-account-types",
      "created-at"
   ]
}

Fields:
field address : Address [Required]
field agreed_to_margining : bool | None = None (alias 'agreed-to-margining')
field agreed_to_terms : bool | None = None (alias 'agreed-to-terms')
field birth_country : str | None = None (alias 'birth-country')
field birth_date : date [Required] (alias 'birth-date')
field citizenship_country : str | None = None (alias 'citizenship-country')
field created_at : datetime [Required] (alias 'created-at')
field customer_suitability : CustomerSuitability | None = None (alias 'customer-suitability')
field desk_customer_id : str | None = None (alias 'desk-customer-id')
field email : str [Required]
field entity : CustomerEntity | None = None
field ext_crm_id : str | None = None (alias 'ext-crm-id')
field external_id : str | None = None (alias 'external-id')
field family_member_names : str | None = None (alias 'family-member-names')
field first_name : str [Required] (alias 'first-name')
field first_surname : str | None = None (alias 'first-surname')
field foreign_tax_number : str | None = None (alias 'foreign-tax-number')
field gender : str | None = None
field has_delayed_quotes : bool [Required] (alias 'has-delayed-quotes')
field has_industry_affiliation : bool [Required] (alias 'has-industry-affiliation')
field has_institutional_assets : str | bool | None = None (alias 'has-institutional-assets')
field has_listed_affiliation : bool [Required] (alias 'has-listed-affiliation')
field has_pending_or_approved_application : bool [Required] (alias 'has-pending-or-approved-application')
field has_political_affiliation : bool [Required] (alias 'has-political-affiliation')
field home_phone_number : str | None = None (alias 'home-phone-number')
field id : str [Required]
field identifiable_type : str | None = None (alias 'identifiable-type')
field industry_affiliation_firm : str | None = None (alias 'industry-affiliation-firm')
field is_foreign : bool [Required] (alias 'is-foreign')
field is_investment_adviser : bool | None = None (alias 'is-investment-adviser')
field is_professional : bool [Required] (alias 'is-professional')
field last_name : str [Required] (alias 'last-name')
field listed_affiliation_symbol : str | None = None (alias 'listed-affiliation-symbol')
field mailing_address : Address [Required] (alias 'mailing-address')
field middle_name : str | None = None (alias 'middle-name')
field mobile_phone_number : str [Required] (alias 'mobile-phone-number')
field permitted_account_types : list[CustomerAccountType] [Required] (alias 'permitted-account-types')
field person : CustomerPerson | None = None
field political_organization : str | None = None (alias 'political-organization')
field prefix_name : str | None = None (alias 'prefix-name')
field regulatory_domain : str | None = None (alias 'regulatory-domain')
field second_surname : str | None = None (alias 'second-surname')
field signature_of_agreement : bool | None = None (alias 'signature-of-agreement')
field subject_to_tax_withholding : bool [Required] (alias 'subject-to-tax-withholding')
field suffix_name : str | None = None (alias 'suffix-name')
field tax_number : str | None = None (alias 'tax-number')
field tax_number_type : str [Required] (alias 'tax-number-type')
field usa_citizenship_type : str [Required] (alias 'usa-citizenship-type')
field user_id : str | None = None (alias 'user-id')
field visa_expiration_date : date | None = None (alias 'visa-expiration-date')
field visa_type : str | None = None (alias 'visa-type')
field work_phone_number : str | None = None (alias 'work-phone-number')
pydantic model tastytrade.session.CustomerAccountMarginType(*, name: str, is_margin: bool)

Bases: TastytradeData

Dataclass containing margin information for a customer account type.

Show JSON schema
{
   "title": "CustomerAccountMarginType",
   "description": "Dataclass containing margin information for a customer account type.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "is-margin": {
         "title": "Is-Margin",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "is-margin"
   ]
}

Fields:
field is_margin : bool [Required] (alias 'is-margin')
field name : str [Required]
pydantic model tastytrade.session.CustomerAccountType(*, name: str, description: str, is_tax_advantaged: bool, is_publicly_available: bool, has_multiple_owners: bool, margin_types: list[CustomerAccountMarginType])

Bases: TastytradeData

Dataclass containing information for a type of customer account.

Show JSON schema
{
   "title": "CustomerAccountType",
   "description": "Dataclass containing information for a type of customer account.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "is-tax-advantaged": {
         "title": "Is-Tax-Advantaged",
         "type": "boolean"
      },
      "is-publicly-available": {
         "title": "Is-Publicly-Available",
         "type": "boolean"
      },
      "has-multiple-owners": {
         "title": "Has-Multiple-Owners",
         "type": "boolean"
      },
      "margin-types": {
         "items": {
            "$ref": "#/$defs/CustomerAccountMarginType"
         },
         "title": "Margin-Types",
         "type": "array"
      }
   },
   "$defs": {
      "CustomerAccountMarginType": {
         "description": "Dataclass containing margin information for a customer account type.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "is-margin": {
               "title": "Is-Margin",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "is-margin"
         ],
         "title": "CustomerAccountMarginType",
         "type": "object"
      }
   },
   "required": [
      "name",
      "description",
      "is-tax-advantaged",
      "is-publicly-available",
      "has-multiple-owners",
      "margin-types"
   ]
}

Fields:
field description : str [Required]
field has_multiple_owners : bool [Required] (alias 'has-multiple-owners')
field is_publicly_available : bool [Required] (alias 'is-publicly-available')
field is_tax_advantaged : bool [Required] (alias 'is-tax-advantaged')
field margin_types : list[CustomerAccountMarginType] [Required] (alias 'margin-types')
field name : str [Required]
pydantic model tastytrade.session.CustomerEntity(*, id: str, address: Address, business_nature: str, email: str, entity_officers: list[EntityOfficer], entity_suitability: EntitySuitability, entity_type: str, foreign_institution: str, grantor_birth_date: str, grantor_email: str, grantor_first_name: str, grantor_last_name: str, grantor_middle_name: str, grantor_tax_number: str, has_foreign_bank_affiliation: str, has_foreign_institution_affiliation: str, is_domestic: bool, legal_name: str, phone_number: str, tax_number: str)

Bases: TastytradeData

Dataclass containing customer entity information.

Show JSON schema
{
   "title": "CustomerEntity",
   "description": "Dataclass containing customer entity information.",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "string"
      },
      "address": {
         "$ref": "#/$defs/Address"
      },
      "business-nature": {
         "title": "Business-Nature",
         "type": "string"
      },
      "email": {
         "title": "Email",
         "type": "string"
      },
      "entity-officers": {
         "items": {
            "$ref": "#/$defs/EntityOfficer"
         },
         "title": "Entity-Officers",
         "type": "array"
      },
      "entity-suitability": {
         "$ref": "#/$defs/EntitySuitability"
      },
      "entity-type": {
         "title": "Entity-Type",
         "type": "string"
      },
      "foreign-institution": {
         "title": "Foreign-Institution",
         "type": "string"
      },
      "grantor-birth-date": {
         "title": "Grantor-Birth-Date",
         "type": "string"
      },
      "grantor-email": {
         "title": "Grantor-Email",
         "type": "string"
      },
      "grantor-first-name": {
         "title": "Grantor-First-Name",
         "type": "string"
      },
      "grantor-last-name": {
         "title": "Grantor-Last-Name",
         "type": "string"
      },
      "grantor-middle-name": {
         "title": "Grantor-Middle-Name",
         "type": "string"
      },
      "grantor-tax-number": {
         "title": "Grantor-Tax-Number",
         "type": "string"
      },
      "has-foreign-bank-affiliation": {
         "title": "Has-Foreign-Bank-Affiliation",
         "type": "string"
      },
      "has-foreign-institution-affiliation": {
         "title": "Has-Foreign-Institution-Affiliation",
         "type": "string"
      },
      "is-domestic": {
         "title": "Is-Domestic",
         "type": "boolean"
      },
      "legal-name": {
         "title": "Legal-Name",
         "type": "string"
      },
      "phone-number": {
         "title": "Phone-Number",
         "type": "string"
      },
      "tax-number": {
         "title": "Tax-Number",
         "type": "string"
      }
   },
   "$defs": {
      "Address": {
         "description": "Dataclass containing customer address information.",
         "properties": {
            "city": {
               "title": "City",
               "type": "string"
            },
            "country": {
               "title": "Country",
               "type": "string"
            },
            "is-domestic": {
               "title": "Is-Domestic",
               "type": "boolean"
            },
            "is-foreign": {
               "title": "Is-Foreign",
               "type": "boolean"
            },
            "postal-code": {
               "title": "Postal-Code",
               "type": "string"
            },
            "state-region": {
               "title": "State-Region",
               "type": "string"
            },
            "street-one": {
               "title": "Street-One",
               "type": "string"
            },
            "street-two": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Street-Two"
            },
            "street-three": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Street-Three"
            }
         },
         "required": [
            "city",
            "country",
            "is-domestic",
            "is-foreign",
            "postal-code",
            "state-region",
            "street-one"
         ],
         "title": "Address",
         "type": "object"
      },
      "EntityOfficer": {
         "description": "Dataclass containing entity officer information.",
         "properties": {
            "id": {
               "title": "Id",
               "type": "string"
            },
            "external-id": {
               "title": "External-Id",
               "type": "string"
            },
            "first-name": {
               "title": "First-Name",
               "type": "string"
            },
            "last-name": {
               "title": "Last-Name",
               "type": "string"
            },
            "middle-name": {
               "title": "Middle-Name",
               "type": "string"
            },
            "prefix-name": {
               "title": "Prefix-Name",
               "type": "string"
            },
            "suffix-name": {
               "title": "Suffix-Name",
               "type": "string"
            },
            "address": {
               "$ref": "#/$defs/Address"
            },
            "birth-country": {
               "title": "Birth-Country",
               "type": "string"
            },
            "birth-date": {
               "format": "date",
               "title": "Birth-Date",
               "type": "string"
            },
            "citizenship-country": {
               "title": "Citizenship-Country",
               "type": "string"
            },
            "email": {
               "title": "Email",
               "type": "string"
            },
            "employer-name": {
               "title": "Employer-Name",
               "type": "string"
            },
            "employment-status": {
               "title": "Employment-Status",
               "type": "string"
            },
            "home-phone-number": {
               "title": "Home-Phone-Number",
               "type": "string"
            },
            "is-foreign": {
               "title": "Is-Foreign",
               "type": "boolean"
            },
            "job-title": {
               "title": "Job-Title",
               "type": "string"
            },
            "marital-status": {
               "title": "Marital-Status",
               "type": "string"
            },
            "mobile-phone-number": {
               "title": "Mobile-Phone-Number",
               "type": "string"
            },
            "number-of-dependents": {
               "title": "Number-Of-Dependents",
               "type": "integer"
            },
            "occupation": {
               "title": "Occupation",
               "type": "string"
            },
            "owner-of-record": {
               "title": "Owner-Of-Record",
               "type": "boolean"
            },
            "relationship-to-entity": {
               "title": "Relationship-To-Entity",
               "type": "string"
            },
            "tax-number": {
               "title": "Tax-Number",
               "type": "string"
            },
            "tax-number-type": {
               "title": "Tax-Number-Type",
               "type": "string"
            },
            "usa-citizenship-type": {
               "title": "Usa-Citizenship-Type",
               "type": "string"
            },
            "visa-expiration-date": {
               "format": "date",
               "title": "Visa-Expiration-Date",
               "type": "string"
            },
            "visa-type": {
               "title": "Visa-Type",
               "type": "string"
            },
            "work-phone-number": {
               "title": "Work-Phone-Number",
               "type": "string"
            }
         },
         "required": [
            "id",
            "external-id",
            "first-name",
            "last-name",
            "middle-name",
            "prefix-name",
            "suffix-name",
            "address",
            "birth-country",
            "birth-date",
            "citizenship-country",
            "email",
            "employer-name",
            "employment-status",
            "home-phone-number",
            "is-foreign",
            "job-title",
            "marital-status",
            "mobile-phone-number",
            "number-of-dependents",
            "occupation",
            "owner-of-record",
            "relationship-to-entity",
            "tax-number",
            "tax-number-type",
            "usa-citizenship-type",
            "visa-expiration-date",
            "visa-type",
            "work-phone-number"
         ],
         "title": "EntityOfficer",
         "type": "object"
      },
      "EntitySuitability": {
         "description": "Dataclass containing entity suitability information.",
         "properties": {
            "id": {
               "title": "Id",
               "type": "string"
            },
            "annual-net-income": {
               "title": "Annual-Net-Income",
               "type": "integer"
            },
            "covered-options-trading-experience": {
               "title": "Covered-Options-Trading-Experience",
               "type": "string"
            },
            "entity-id": {
               "title": "Entity-Id",
               "type": "integer"
            },
            "futures-trading-experience": {
               "title": "Futures-Trading-Experience",
               "type": "string"
            },
            "liquid-net-worth": {
               "title": "Liquid-Net-Worth",
               "type": "integer"
            },
            "net-worth": {
               "title": "Net-Worth",
               "type": "integer"
            },
            "stock-trading-experience": {
               "title": "Stock-Trading-Experience",
               "type": "string"
            },
            "tax-bracket": {
               "title": "Tax-Bracket",
               "type": "string"
            },
            "uncovered-options-trading-experience": {
               "title": "Uncovered-Options-Trading-Experience",
               "type": "string"
            }
         },
         "required": [
            "id",
            "annual-net-income",
            "covered-options-trading-experience",
            "entity-id",
            "futures-trading-experience",
            "liquid-net-worth",
            "net-worth",
            "stock-trading-experience",
            "tax-bracket",
            "uncovered-options-trading-experience"
         ],
         "title": "EntitySuitability",
         "type": "object"
      }
   },
   "required": [
      "id",
      "address",
      "business-nature",
      "email",
      "entity-officers",
      "entity-suitability",
      "entity-type",
      "foreign-institution",
      "grantor-birth-date",
      "grantor-email",
      "grantor-first-name",
      "grantor-last-name",
      "grantor-middle-name",
      "grantor-tax-number",
      "has-foreign-bank-affiliation",
      "has-foreign-institution-affiliation",
      "is-domestic",
      "legal-name",
      "phone-number",
      "tax-number"
   ]
}

Fields:
field address : Address [Required]
field business_nature : str [Required] (alias 'business-nature')
field email : str [Required]
field entity_officers : list[EntityOfficer] [Required] (alias 'entity-officers')
field entity_suitability : EntitySuitability [Required] (alias 'entity-suitability')
field entity_type : str [Required] (alias 'entity-type')
field foreign_institution : str [Required] (alias 'foreign-institution')
field grantor_birth_date : str [Required] (alias 'grantor-birth-date')
field grantor_email : str [Required] (alias 'grantor-email')
field grantor_first_name : str [Required] (alias 'grantor-first-name')
field grantor_last_name : str [Required] (alias 'grantor-last-name')
field grantor_middle_name : str [Required] (alias 'grantor-middle-name')
field grantor_tax_number : str [Required] (alias 'grantor-tax-number')
field has_foreign_bank_affiliation : str [Required] (alias 'has-foreign-bank-affiliation')
field has_foreign_institution_affiliation : str [Required] (alias 'has-foreign-institution-affiliation')
field id : str [Required]
field is_domestic : bool [Required] (alias 'is-domestic')
field legal_name : str [Required] (alias 'legal-name')
field phone_number : str [Required] (alias 'phone-number')
field tax_number : str [Required] (alias 'tax-number')
pydantic model tastytrade.session.CustomerPerson(*, external_id: str, first_name: str, last_name: str, citizenship_country: str, usa_citizenship_type: str, employment_status: str, marital_status: str, number_of_dependents: int, occupation: str | None = None, middle_name: str | None = None, prefix_name: str | None = None, suffix_name: str | None = None, birth_country: str | None = None, birth_date: date | str | None = None, visa_expiration_date: date | None = None, visa_type: str | None = None, employer_name: str | None = None, job_title: str | None = None)

Bases: TastytradeData

Dataclass containing customer person information.

Show JSON schema
{
   "title": "CustomerPerson",
   "description": "Dataclass containing customer person information.",
   "type": "object",
   "properties": {
      "external-id": {
         "title": "External-Id",
         "type": "string"
      },
      "first-name": {
         "title": "First-Name",
         "type": "string"
      },
      "last-name": {
         "title": "Last-Name",
         "type": "string"
      },
      "citizenship-country": {
         "title": "Citizenship-Country",
         "type": "string"
      },
      "usa-citizenship-type": {
         "title": "Usa-Citizenship-Type",
         "type": "string"
      },
      "employment-status": {
         "title": "Employment-Status",
         "type": "string"
      },
      "marital-status": {
         "title": "Marital-Status",
         "type": "string"
      },
      "number-of-dependents": {
         "title": "Number-Of-Dependents",
         "type": "integer"
      },
      "occupation": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Occupation"
      },
      "middle-name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Middle-Name"
      },
      "prefix-name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Prefix-Name"
      },
      "suffix-name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Suffix-Name"
      },
      "birth-country": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Birth-Country"
      },
      "birth-date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Birth-Date"
      },
      "visa-expiration-date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Visa-Expiration-Date"
      },
      "visa-type": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Visa-Type"
      },
      "employer-name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Employer-Name"
      },
      "job-title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Job-Title"
      }
   },
   "required": [
      "external-id",
      "first-name",
      "last-name",
      "citizenship-country",
      "usa-citizenship-type",
      "employment-status",
      "marital-status",
      "number-of-dependents"
   ]
}

Fields:
field birth_country : str | None = None (alias 'birth-country')
field birth_date : date | str | None = None (alias 'birth-date')
field citizenship_country : str [Required] (alias 'citizenship-country')
field employer_name : str | None = None (alias 'employer-name')
field employment_status : str [Required] (alias 'employment-status')
field external_id : str [Required] (alias 'external-id')
field first_name : str [Required] (alias 'first-name')
field job_title : str | None = None (alias 'job-title')
field last_name : str [Required] (alias 'last-name')
field marital_status : str [Required] (alias 'marital-status')
field middle_name : str | None = None (alias 'middle-name')
field number_of_dependents : int [Required] (alias 'number-of-dependents')
field occupation : str | None = None
field prefix_name : str | None = None (alias 'prefix-name')
field suffix_name : str | None = None (alias 'suffix-name')
field usa_citizenship_type : str [Required] (alias 'usa-citizenship-type')
field visa_expiration_date : date | None = None (alias 'visa-expiration-date')
field visa_type : str | None = None (alias 'visa-type')
pydantic model tastytrade.session.CustomerSuitability(*, id: int, annual_net_income: int, covered_options_trading_experience: str, employment_status: str, futures_trading_experience: str, liquid_net_worth: int, marital_status: str, net_worth: int, number_of_dependents: int, stock_trading_experience: str, uncovered_options_trading_experience: str, customer_id: str | None = None, employer_name: str | None = None, job_title: str | None = None, occupation: str | None = None, tax_bracket: str | None = None)

Bases: TastytradeData

Dataclass containing customer suitability information.

Show JSON schema
{
   "title": "CustomerSuitability",
   "description": "Dataclass containing customer suitability information.",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "annual-net-income": {
         "title": "Annual-Net-Income",
         "type": "integer"
      },
      "covered-options-trading-experience": {
         "title": "Covered-Options-Trading-Experience",
         "type": "string"
      },
      "employment-status": {
         "title": "Employment-Status",
         "type": "string"
      },
      "futures-trading-experience": {
         "title": "Futures-Trading-Experience",
         "type": "string"
      },
      "liquid-net-worth": {
         "title": "Liquid-Net-Worth",
         "type": "integer"
      },
      "marital-status": {
         "title": "Marital-Status",
         "type": "string"
      },
      "net-worth": {
         "title": "Net-Worth",
         "type": "integer"
      },
      "number-of-dependents": {
         "title": "Number-Of-Dependents",
         "type": "integer"
      },
      "stock-trading-experience": {
         "title": "Stock-Trading-Experience",
         "type": "string"
      },
      "uncovered-options-trading-experience": {
         "title": "Uncovered-Options-Trading-Experience",
         "type": "string"
      },
      "customer-id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Customer-Id"
      },
      "employer-name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Employer-Name"
      },
      "job-title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Job-Title"
      },
      "occupation": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Occupation"
      },
      "tax-bracket": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Tax-Bracket"
      }
   },
   "required": [
      "id",
      "annual-net-income",
      "covered-options-trading-experience",
      "employment-status",
      "futures-trading-experience",
      "liquid-net-worth",
      "marital-status",
      "net-worth",
      "number-of-dependents",
      "stock-trading-experience",
      "uncovered-options-trading-experience"
   ]
}

Fields:
field annual_net_income : int [Required] (alias 'annual-net-income')
field covered_options_trading_experience : str [Required] (alias 'covered-options-trading-experience')
field customer_id : str | None = None (alias 'customer-id')
field employer_name : str | None = None (alias 'employer-name')
field employment_status : str [Required] (alias 'employment-status')
field futures_trading_experience : str [Required] (alias 'futures-trading-experience')
field id : int [Required]
field job_title : str | None = None (alias 'job-title')
field liquid_net_worth : int [Required] (alias 'liquid-net-worth')
field marital_status : str [Required] (alias 'marital-status')
field net_worth : int [Required] (alias 'net-worth')
field number_of_dependents : int [Required] (alias 'number-of-dependents')
field occupation : str | None = None
field stock_trading_experience : str [Required] (alias 'stock-trading-experience')
field tax_bracket : str | None = None (alias 'tax-bracket')
field uncovered_options_trading_experience : str [Required] (alias 'uncovered-options-trading-experience')
pydantic model tastytrade.session.EntityOfficer(*, id: str, external_id: str, first_name: str, last_name: str, middle_name: str, prefix_name: str, suffix_name: str, address: Address, birth_country: str, birth_date: date, citizenship_country: str, email: str, employer_name: str, employment_status: str, home_phone_number: str, is_foreign: bool, job_title: str, marital_status: str, mobile_phone_number: str, number_of_dependents: int, occupation: str, owner_of_record: bool, relationship_to_entity: str, tax_number: str, tax_number_type: str, usa_citizenship_type: str, visa_expiration_date: date, visa_type: str, work_phone_number: str)

Bases: TastytradeData

Dataclass containing entity officer information.

Show JSON schema
{
   "title": "EntityOfficer",
   "description": "Dataclass containing entity officer information.",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "string"
      },
      "external-id": {
         "title": "External-Id",
         "type": "string"
      },
      "first-name": {
         "title": "First-Name",
         "type": "string"
      },
      "last-name": {
         "title": "Last-Name",
         "type": "string"
      },
      "middle-name": {
         "title": "Middle-Name",
         "type": "string"
      },
      "prefix-name": {
         "title": "Prefix-Name",
         "type": "string"
      },
      "suffix-name": {
         "title": "Suffix-Name",
         "type": "string"
      },
      "address": {
         "$ref": "#/$defs/Address"
      },
      "birth-country": {
         "title": "Birth-Country",
         "type": "string"
      },
      "birth-date": {
         "format": "date",
         "title": "Birth-Date",
         "type": "string"
      },
      "citizenship-country": {
         "title": "Citizenship-Country",
         "type": "string"
      },
      "email": {
         "title": "Email",
         "type": "string"
      },
      "employer-name": {
         "title": "Employer-Name",
         "type": "string"
      },
      "employment-status": {
         "title": "Employment-Status",
         "type": "string"
      },
      "home-phone-number": {
         "title": "Home-Phone-Number",
         "type": "string"
      },
      "is-foreign": {
         "title": "Is-Foreign",
         "type": "boolean"
      },
      "job-title": {
         "title": "Job-Title",
         "type": "string"
      },
      "marital-status": {
         "title": "Marital-Status",
         "type": "string"
      },
      "mobile-phone-number": {
         "title": "Mobile-Phone-Number",
         "type": "string"
      },
      "number-of-dependents": {
         "title": "Number-Of-Dependents",
         "type": "integer"
      },
      "occupation": {
         "title": "Occupation",
         "type": "string"
      },
      "owner-of-record": {
         "title": "Owner-Of-Record",
         "type": "boolean"
      },
      "relationship-to-entity": {
         "title": "Relationship-To-Entity",
         "type": "string"
      },
      "tax-number": {
         "title": "Tax-Number",
         "type": "string"
      },
      "tax-number-type": {
         "title": "Tax-Number-Type",
         "type": "string"
      },
      "usa-citizenship-type": {
         "title": "Usa-Citizenship-Type",
         "type": "string"
      },
      "visa-expiration-date": {
         "format": "date",
         "title": "Visa-Expiration-Date",
         "type": "string"
      },
      "visa-type": {
         "title": "Visa-Type",
         "type": "string"
      },
      "work-phone-number": {
         "title": "Work-Phone-Number",
         "type": "string"
      }
   },
   "$defs": {
      "Address": {
         "description": "Dataclass containing customer address information.",
         "properties": {
            "city": {
               "title": "City",
               "type": "string"
            },
            "country": {
               "title": "Country",
               "type": "string"
            },
            "is-domestic": {
               "title": "Is-Domestic",
               "type": "boolean"
            },
            "is-foreign": {
               "title": "Is-Foreign",
               "type": "boolean"
            },
            "postal-code": {
               "title": "Postal-Code",
               "type": "string"
            },
            "state-region": {
               "title": "State-Region",
               "type": "string"
            },
            "street-one": {
               "title": "Street-One",
               "type": "string"
            },
            "street-two": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Street-Two"
            },
            "street-three": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Street-Three"
            }
         },
         "required": [
            "city",
            "country",
            "is-domestic",
            "is-foreign",
            "postal-code",
            "state-region",
            "street-one"
         ],
         "title": "Address",
         "type": "object"
      }
   },
   "required": [
      "id",
      "external-id",
      "first-name",
      "last-name",
      "middle-name",
      "prefix-name",
      "suffix-name",
      "address",
      "birth-country",
      "birth-date",
      "citizenship-country",
      "email",
      "employer-name",
      "employment-status",
      "home-phone-number",
      "is-foreign",
      "job-title",
      "marital-status",
      "mobile-phone-number",
      "number-of-dependents",
      "occupation",
      "owner-of-record",
      "relationship-to-entity",
      "tax-number",
      "tax-number-type",
      "usa-citizenship-type",
      "visa-expiration-date",
      "visa-type",
      "work-phone-number"
   ]
}

Fields:
field address : Address [Required]
field birth_country : str [Required] (alias 'birth-country')
field birth_date : date [Required] (alias 'birth-date')
field citizenship_country : str [Required] (alias 'citizenship-country')
field email : str [Required]
field employer_name : str [Required] (alias 'employer-name')
field employment_status : str [Required] (alias 'employment-status')
field external_id : str [Required] (alias 'external-id')
field first_name : str [Required] (alias 'first-name')
field home_phone_number : str [Required] (alias 'home-phone-number')
field id : str [Required]
field is_foreign : bool [Required] (alias 'is-foreign')
field job_title : str [Required] (alias 'job-title')
field last_name : str [Required] (alias 'last-name')
field marital_status : str [Required] (alias 'marital-status')
field middle_name : str [Required] (alias 'middle-name')
field mobile_phone_number : str [Required] (alias 'mobile-phone-number')
field number_of_dependents : int [Required] (alias 'number-of-dependents')
field occupation : str [Required]
field owner_of_record : bool [Required] (alias 'owner-of-record')
field prefix_name : str [Required] (alias 'prefix-name')
field relationship_to_entity : str [Required] (alias 'relationship-to-entity')
field suffix_name : str [Required] (alias 'suffix-name')
field tax_number : str [Required] (alias 'tax-number')
field tax_number_type : str [Required] (alias 'tax-number-type')
field usa_citizenship_type : str [Required] (alias 'usa-citizenship-type')
field visa_expiration_date : date [Required] (alias 'visa-expiration-date')
field visa_type : str [Required] (alias 'visa-type')
field work_phone_number : str [Required] (alias 'work-phone-number')
pydantic model tastytrade.session.EntitySuitability(*, id: str, annual_net_income: int, covered_options_trading_experience: str, entity_id: int, futures_trading_experience: str, liquid_net_worth: int, net_worth: int, stock_trading_experience: str, tax_bracket: str, uncovered_options_trading_experience: str)

Bases: TastytradeData

Dataclass containing entity suitability information.

Show JSON schema
{
   "title": "EntitySuitability",
   "description": "Dataclass containing entity suitability information.",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "string"
      },
      "annual-net-income": {
         "title": "Annual-Net-Income",
         "type": "integer"
      },
      "covered-options-trading-experience": {
         "title": "Covered-Options-Trading-Experience",
         "type": "string"
      },
      "entity-id": {
         "title": "Entity-Id",
         "type": "integer"
      },
      "futures-trading-experience": {
         "title": "Futures-Trading-Experience",
         "type": "string"
      },
      "liquid-net-worth": {
         "title": "Liquid-Net-Worth",
         "type": "integer"
      },
      "net-worth": {
         "title": "Net-Worth",
         "type": "integer"
      },
      "stock-trading-experience": {
         "title": "Stock-Trading-Experience",
         "type": "string"
      },
      "tax-bracket": {
         "title": "Tax-Bracket",
         "type": "string"
      },
      "uncovered-options-trading-experience": {
         "title": "Uncovered-Options-Trading-Experience",
         "type": "string"
      }
   },
   "required": [
      "id",
      "annual-net-income",
      "covered-options-trading-experience",
      "entity-id",
      "futures-trading-experience",
      "liquid-net-worth",
      "net-worth",
      "stock-trading-experience",
      "tax-bracket",
      "uncovered-options-trading-experience"
   ]
}

Fields:
field annual_net_income : int [Required] (alias 'annual-net-income')
field covered_options_trading_experience : str [Required] (alias 'covered-options-trading-experience')
field entity_id : int [Required] (alias 'entity-id')
field futures_trading_experience : str [Required] (alias 'futures-trading-experience')
field id : str [Required]
field liquid_net_worth : int [Required] (alias 'liquid-net-worth')
field net_worth : int [Required] (alias 'net-worth')
field stock_trading_experience : str [Required] (alias 'stock-trading-experience')
field tax_bracket : str [Required] (alias 'tax-bracket')
field uncovered_options_trading_experience : str [Required] (alias 'uncovered-options-trading-experience')
class tastytrade.session.Session(provider_secret: str | None = None, refresh_token: str | None = None, is_test: bool = False, **client_kwargs: Any)

Bases: AsyncContextManagerMixin

Contains a managed user login which can then be used to interact with the remote API.

Prefer using with its async context manager to ensure proper cleanup.

Parameters:
provider_secret: str | None = None

OAuth secret for your provider; defaults to the $TT_SECRET environment variable

refresh_token: str | None = None

refresh token for the user; defaults to the $TT_REFRESH environment variable

is_test: bool = False

whether to use the test API endpoints, default False

**client_kwargs: Any

additional keyword arguments to pass to the httpx AsyncClient, such as timeout

classmethod deserialize(serialized: str) Self

Create a new Session object from a serialized string.

async get_customer() Customer

Gets the customer dict from the API.

is_test

Whether this is a cert or real session

provider_secret

OAuth secret for your provider

async refresh(force: bool = False) None

Manually trigger a refresh of the session token.

Usually unnecessary, unless you want to make sure sessions are “pre-warmed” prior to making a request for improved latency.

Parameters:
force: bool = False

whether to refresh the session even if it’s still valid

refresh_token

Refresh token for the user

serialize() str

Serializes the session to a string, useful for storing a session for later use. Could be used with pickle, Redis, etc. Only sessions with JSON serializable client_kwargs can be serialized.

session_expiration

timestamp that the session will expire

session_token

token used for authentication

async validate() bool

Check if the current session is valid by sending a request to the API.