correct_accounts#
API documentation for tradeexecutor.cli.commands.correct_accounts.correct_accounts Python function.
- correct_accounts(id=<typer.models.OptionInfo object>, strategy_file=<typer.models.OptionInfo object>, state_file=<typer.models.OptionInfo object>, private_key=<typer.models.OptionInfo object>, log_level=<typer.models.OptionInfo object>, trading_strategy_api_key=<typer.models.OptionInfo object>, cache_path=<typer.models.OptionInfo object>, asset_management_mode=<typer.models.OptionInfo object>, vault_address=<typer.models.OptionInfo object>, vault_adapter_address=<typer.models.OptionInfo object>, vault_payment_forwarder=<typer.models.OptionInfo object>, vault_deployment_block_number=<typer.models.OptionInfo object>, json_rpc_binance=<typer.models.OptionInfo object>, json_rpc_polygon=<typer.models.OptionInfo object>, json_rpc_avalanche=<typer.models.OptionInfo object>, json_rpc_ethereum=<typer.models.OptionInfo object>, json_rpc_arbitrum=<typer.models.OptionInfo object>, json_rpc_anvil=<typer.models.OptionInfo object>, unknown_token_receiver=<typer.models.OptionInfo object>, test_evm_uniswap_v2_router=<typer.models.OptionInfo object>, test_evm_uniswap_v2_factory=<typer.models.OptionInfo object>, test_evm_uniswap_v2_init_code_hash=<typer.models.OptionInfo object>, unit_testing=<typer.models.OptionInfo object>, chain_settle_wait_seconds=<typer.models.OptionInfo object>, skip_save=<typer.models.OptionInfo object>, skip_interest=<typer.models.OptionInfo object>, process_redemption=<typer.models.OptionInfo object>, process_redemption_end_block_hint=<typer.models.OptionInfo object>, transfer_away=<typer.models.OptionInfo object>)[source]#
Correct accounting errors in the internal ledger of the trade executor.
Trade executor tracks all non-controlled flow of assets with events. This includes deposits and redemptions and interest events. Under misbehavior, tracked asset amounts in the internal ledger might drift off from the actual on-chain balances. Such misbehavior may be caused e.g. misbehaving blockchain nodes.
This command will fix any accounting divergences between a vault and a strategy state. The strategy must not have any open positions to be reinitialised, because those open positions cannot carry over with the current event based tracking logic.
This command is interactive and you need to confirm any changes applied to the state.
An old state file is automatically backed up.
- Parameters:
id (str) –
strategy_file (Path) –
log_level (str) –
trading_strategy_api_key (str) –
asset_management_mode (AssetManagementMode) –
unit_testing (bool) –
chain_settle_wait_seconds (float) –
skip_save (bool) –
skip_interest (bool) –
process_redemption (bool) –
process_redemption_end_block_hint (int) –
transfer_away (bool) –