Treasury#
API documentation for 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>, pending_redemptions=None, share_count=None)#
 - 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. - How much pending redemptions we have? - Number of issued shares. - List of refences 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 refences to all balance update events. - The actual balance update content is stored on the position itself. 
 - pending_redemptions: Optional[float] = None#
- How much pending redemptions we have? - For Lagoon based vaults, we need to sell assets to satisfy redemptions on the next cycle. 
 - Number of issued shares. - For Lagoon based vaults, needed to calcualte share price. 
 - __init__(last_updated_at=None, last_cycle_at=None, last_block_scanned=None, balance_update_refs=<factory>, pending_redemptions=None, share_count=None)#