HotWalletSyncModel#
tradeexecutor.ethereum.hot_wallet_sync_model.HotWalletSyncModel Python class in Trading Strategy framework.
- class HotWalletSyncModel[source]#
Bases:
SyncModel
V0 prototype version of sync model, only for.
Warning
TODO: This model is unfinished and needs to be migrated to event based.
Methods
__init__
(web3, hot_wallet)Creates a transaction builder instance to make trades against this asset management model.
Get the vault address we are using.
get_vault_address
()Get the vault address we are using.
init
()setup_all
(state, supported_reserves)Make sure we have everything set up and initial test balance synced.
sync_initial
(state)Set u[ initial sync details.
sync_treasury
(strategy_cycle_ts, state[, ...])Apply the balance sync before each strategy cycle.
- sync_treasury(strategy_cycle_ts, state, supported_reserves=None)[source]#
Apply the balance sync before each strategy cycle.
- Parameters:
strategy_cycle_ts (datetime) –
state (State) –
supported_reserves (Optional[List[AssetIdentifier]]) –
- Return type:
- create_transaction_builder()[source]#
Creates a transaction builder instance to make trades against this asset management model.
Only needed when trades are being executed.
- Returns:
Depending on the asset management mode.
- Return type:
- setup_all(state, supported_reserves)[source]#
Make sure we have everything set up and initial test balance synced.
A shortcut used in testing.
- Parameters:
state (State) –
supported_reserves (List[AssetIdentifier]) –