InterestDistributionOperation#

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

class InterestDistributionOperation[source]#

Bases: object

One interest update batch we do.

__init__(start, end, assets, asset_interest_data, entries, effective_rate)#
Parameters:
Return type:

None

Methods

__init__(start, end, assets, ...)

from_dict(kvs, *[, infer_missing])

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

get_interest_data(asset)

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

to_dict([encode_json])

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

Attributes

start

Starting period of time span for which we calculate the interest.

end

Ending period of time span for which we calculate the interest

assets

All interest bearing assets we have across positions

asset_interest_data

Asset interest data entries keyed (chain id, address) tuples

entries

All entries we need to update.

effective_rate

duration

The time span for which we updated the accrued interest.

start: datetime#

Starting period of time span for which we calculate the interest.

Timestamp of the previously synced block.

end: datetime#

Ending period of time span for which we calculate the interest

Timestamp of the the block end range

assets: Set[AssetIdentifier]#

All interest bearing assets we have across positions

asset_interest_data: Dict[str, AssetInterestData]#

Asset interest data entries keyed (chain id, address) tuples

entries: List[InterestDistributionEntry]#

All entries we need to update.

One or two entries per position accruing interest.

property duration: timedelta#

The time span for which we updated the accrued interest.

__init__(start, end, assets, asset_interest_data, entries, effective_rate)#
Parameters:
Return type:

None