Transaction

class app.portfolio.models.transaction.transaction.Transaction[source]

Bases: IncrementingUidEntity

Inheritance diagram of Transaction

Inheritance Diagram for Transaction

Methods

uid_namespace(data)

Returns the namespace for the UID.

Attributes

model_config

Configuration for the model, should be a dictionary conforming to ConfigDict.

instrument

type

date

quantity

consideration

fees

uid

entity_log

version

instance_parent

consideration: Decimal
date: date
fees: Decimal
instrument: Instrument
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}

Configuration for the model, should be a dictionary conforming to ConfigDict.

quantity: Decimal
type: TransactionType
classmethod uid_namespace(data)[source]

Returns the namespace for the UID. This can be overridden in subclasses to provide a custom namespace.

Return type:

str

Parameters:

data (dict[str, Any])