plaid2.model.investment_transaction module
- class plaid2.model.investment_transaction.InvestmentTransaction(*, security_id: Optional[str] = None, investment_transaction_id: str, price: float, amount: float, name: str, type: str, account_id: str, date: str, cancel_transaction_id: Optional[str] = None, unofficial_currency_code: Optional[str] = None, iso_currency_code: Optional[str] = None, fees: Optional[float] = None, quantity: float, subtype: str)[source]
Bases:
BaseModel
- account_id: str
The account_id of the account against which this transaction posted.
- amount: float
The complete value of the transaction. Positive values when cash is debited, e.g. purchases of stock; negative values when cash is credited, e.g. sales of stock. Treatment remains the same for cash-only movements unassociated with securities.
- cancel_transaction_id: Optional[str]
A legacy field formerly used internally by Plaid to identify certain canceled transactions.
- date: str
//wikipedia.org/wiki/ISO_8601) posting date for the transaction.
- Type
The [ISO 8601](https
- dict(**kwargs: Any) Dict[str, Any] [source]
Return a dict representation of the object. Takes same keyword arguments as pydantic.BaseModel.dict
- fees: Optional[float]
The combined value of all fees applied to this transaction
- investment_transaction_id: str
The ID of the Investment transaction, unique across all Plaid transactions. Like all Plaid identifiers, the investment_transaction_id is case sensitive.
- iso_currency_code: Optional[str]
The ISO-4217 currency code of the transaction. Always null if unofficial_currency_code is non-null.
- json(**kwargs: Any) str [source]
Return a json string representation of the object. Takes same keyword arguments as pydantic.BaseModel.json
- name_: str
The institution’s description of the transaction.
- classmethod parse_obj(data: Any) InvestmentTransaction [source]
Parse a dict into the object. Takes same keyword arguments as pydantic.BaseModel.parse_obj
- classmethod parse_raw(b: Union[bytes, str], **kwargs: Any) InvestmentTransaction [source]
Parse a json string into the object. Takes same keyword arguments as pydantic.BaseModel.parse_raw
- price: float
The price of the security at which this transaction occurred.
- quantity: float
The number of units of the security involved in this transaction.
- security_id: Optional[str]
The security_id to which this transaction is related.
- subtype: str
//plaid.com/docs/api/accounts/#investment-transaction-types-schema).
- Type
For descriptions of possible transaction types and subtypes, see the [Investment transaction types schema](https
- type: str
Value is one of the following: buy: Buying an investment sell: Selling an investment cancel: A cancellation of a pending transaction cash: Activity that modifies a cash position fee: A fee on the account transfer: Activity which modifies a position, but not through buy/sell activity e.g. options exercise, portfolio transfer
For descriptions of possible transaction types and subtypes, see the [Investment transaction types schema](https://plaid.com/docs/api/accounts/#investment-transaction-types-schema).
- unofficial_currency_code: Optional[str]
The unofficial currency code associated with the holding. Always null if iso_currency_code is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
See the [currency code schema](https://plaid.com/docs/api/accounts#currency-code-schema) for a full listing of supported `iso_currency_code`s.