TransactionSchema

class app.portfolio.models.transaction.transaction_schema.TransactionSchema[source]

Bases: EntitySchemaBase

Inheritance diagram of TransactionSchema

Inheritance Diagram for TransactionSchema

Methods

Attributes

consideration

date

fees

quantity

txn_currency

type

consideration: Decimal = FieldInfo(annotation=NoneType, required=True, description='The consideration amount for the transaction.')
date: date = FieldInfo(annotation=NoneType, required=True, description='The date of the transaction.')
fees: Decimal = FieldInfo(annotation=NoneType, required=False, default=Decimal('0'), description='The fees associated with the transaction.')
quantity: Decimal = FieldInfo(annotation=NoneType, required=True, description='The quantity involved in the transaction.')
txn_currency: Currency | None = FieldInfo(annotation=NoneType, required=False, default=None, alias='currency', alias_priority=2, description="The currency in which the transaction is denominated. If not provided, it defaults to the instrument's currency.", exclude_if=<function TransactionSchema.<lambda>>, repr=False)
type: TransactionType = FieldInfo(annotation=NoneType, required=True, description='The type of transaction.')