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:
start (datetime) –
end (datetime) –
assets (Set[AssetIdentifier]) –
asset_interest_data (Dict[str, AssetInterestData]) –
entries (List[InterestDistributionEntry]) –
- 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
Starting period of time span for which we calculate the interest.
Ending period of time span for which we calculate the interest
All interest bearing assets we have across positions
Asset interest data entries keyed (chain id, address) tuples
All entries we need to update.
effective_rate
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.
- __init__(start, end, assets, asset_interest_data, entries, effective_rate)#
- Parameters:
start (datetime) –
end (datetime) –
assets (Set[AssetIdentifier]) –
asset_interest_data (Dict[str, AssetInterestData]) –
entries (List[InterestDistributionEntry]) –
- Return type:
None