InterestSync#

API documentation for tradeexecutor.state.sync.InterestSync Python class in Trading Strategy framework.

class InterestSync[source]#

Bases: object

Track the interest sync for on-chain rebase tokens.

__init__(last_sync_at=None, last_sync_block=None, last_distribution=None)#
Parameters:
Return type:

None

Methods

__init__([last_sync_at, last_sync_block, ...])

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

last_sync_at

When did we perform the last interest sync all all assets

last_sync_block

Block number when we synced the portfolio

last_distribution

Last operation we did.

last_sync_at: datetime.datetime | None#

When did we perform the last interest sync all all assets

last_sync_block: int | None#

Block number when we synced the portfolio

Backtesting does not use block numbers and has this always set to None.

last_distribution: tradeexecutor.state.interest_distribution.InterestDistributionOperation | None#

Last operation we did.

Data is not needed. Stored only for diagnostics purposes. Always overwritten in the next sync.

__init__(last_sync_at=None, last_sync_block=None, last_distribution=None)#
Parameters:
Return type:

None