AssetInterestData#

API documentation for tradeexecutor.state.interest_distribution.AssetInterestData Python class in Trading Strategy framework.

class AssetInterestData[source]#

Bases: object

Per-asset data we track in interest calculations.

__init__(total=Decimal('0'), effective_rate=None)#
Parameters:
Return type:

None

Methods

__init__([total, effective_rate])

from_dict(kvs, *[, infer_missing])

from_json(s, *[, parse_float, parse_int, ...])

schema(*[, infer_missing, only, exclude, ...])

to_dict([encode_json])

to_json(*[, skipkeys, ensure_ascii, ...])

Attributes

total

Portfolio total quantity of interest bearing assets before the update.

effective_rate

Calculated the effective interest rate for this asset.

total: Decimal#

Portfolio total quantity of interest bearing assets before the update.

effective_rate: float#

Calculated the effective interest rate for this asset.

What was the rate based on the operation duration and on-chain balance change.

__init__(total=Decimal('0'), effective_rate=None)#
Parameters:
Return type:

None