repair#

API documentation for tradeexecutor.cli.commands.repair.repair Python function.

repair(id=<typer.models.OptionInfo object>, name=<typer.models.OptionInfo object>, strategy_file=<typer.models.OptionInfo object>, trading_strategy_api_key=<typer.models.OptionInfo object>, state_file=<typer.models.OptionInfo object>, cache_path=<typer.models.OptionInfo object>, log_level=<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>, private_key=<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_address=<typer.models.OptionInfo object>, min_gas_balance=<typer.models.OptionInfo object>, max_slippage=<typer.models.OptionInfo object>, confirmation_block_count=<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>, auto_approve=<typer.models.OptionInfo object>)[source]#

Repair broken state.

Attempt to repair a broken strategy execution state.

The actions may include

  • If a trade failed and blockchain tx has been marked as reverted, undo this trade in the internal accounting

  • If a tranaction has been broadcasted, and can be now confirmed, confirm this trade

  • If a transaction has not been broadcasted, try to redo the trade by recreating the blockchain transaction objects with a new nonce and broadcast them

See also check-accounts and correct-accounts commands.

Parameters: