Creating an order
Before we can create an order, we need to catch up on previous chapters and set up some prerequisites. First, let’s create a basic Account
class that we may have populated with information from our custodian API in Chapters 10 and 11:
class AccountType(): def __init__(self, value: str): if not value in("Taxable", "Roth IRA", "Traditional IRA"): raise ValueError("Allowed types: Taxable, Roth IRA, Traditional IRA") self.value = value def __eq__(self, other): return self.value == other.value class AccountStatus(): def __init__(self, value: str): if not value in("PENDING", "IN_REVIEW", "APPROVED", "REJECTED", "SUSPENDED"): raise ValueError("Allowed statuses...