Treasury#
tradeexecutor.state.sync.Treasury Python class in Trading Strategy framework.
- class Treasury[source]#
Bases:
object
State of syncind deposits and redemptions from the chain.
- __init__(last_updated_at=None, last_cycle_at=None, last_block_scanned=None, balance_update_refs=<factory>)#
Methods
__init__
([last_updated_at, last_cycle_at, ...])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
What is the last processed block for deposit
The strategy cycle timestamp for which we run the last sync
Wall clock time.
List of refernces to all balance update events.
- last_updated_at: Optional[datetime] = None#
Wall clock time. timestamp for which we run the last sync
Wall clock time, at the beginning on the sync cycle.
- last_cycle_at: Optional[datetime] = None#
The strategy cycle timestamp for which we run the last sync
Wall clock time, at the beginning on the sync cycle.
- last_block_scanned: Optional[int] = None#
What is the last processed block for deposit
0 = not scanned yet
- balance_update_refs: List[BalanceEventRef]#
List of refernces to all balance update events.
The actual balance update content is stored on the position itself.