delete_data_file
Permanently remove a historical data file from OctoBot. Requires explicit confirmation to prevent irreversible data loss; deletion cannot be undone.
Instructions
Permanently delete a historical data file. Confirm-gated (ADR-0003/FR-25).
Deliberately gated, reversed from this addendum's original
not-gated draft -- see the tool spec/requirements doc FR-25 for the
full reasoning: unlike cancel_order/close_position (instantly
correctable), an erroneous delete means re-running a collection that
can take minutes to hours, placing this closer to clear_*_history's
risk profile. If confirm is not exactly true, no OctoBot call is
made at all -- this returns require_confirmation's structured
refusal (a normal return, not an error).
Once confirmed, maps to POST /data_collector?action_type= delete_data_file with the raw file string as the JSON body
(confirmed against source AND live this session: flask.request. get_json()'s raw value is passed straight through to
backtesting_api.delete_data_file(file_name), no wrapping object).
Output on success: {"file": str, "deleted": true, "message": str}
(OctoBot's own confirmed live success body: f"{file} deleted").
Errors: DataFileDeleteRejectedError wrapping OctoBot's own f"Can't delete {file_name} ({error})" text -- confirmed verbatim live this
session for a nonexistent file ("Can't delete does_not_exist.data (file can't be found)").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| confirm | No |