delete_profile
Permanently delete a trading profile after explicit confirmation. Returns a structured refusal if not confirmed, and verifies deletion to avoid false success.
Instructions
Permanently delete a profile. Confirm-gated (ADR-0003): irreversible.
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) instead.
Once confirmed, maps to POST /profiles_management/remove with JSON
body {"id": profile_id} (confirmed against source
controllers/configuration.py's "remove" action, which reads exactly
flask.request.get_json()["id"] -- the spec's documented body shape is
correct here, unlike update_profile's in milestone 5).
Two failure modes confirmed against source
(models/profiles.py::remove_profile), both surfaced as
ProfileDeleteRejectedError:
profile_idis the currently-selected/active profile: OctoBot itself rejects this ("Can't remove the active profile"), returned as HTTP 400 with that exact string as the JSON body.profile_idnames a profile whose removal aProfileRemovalErrorblocks (e.g. an in-use profile): also HTTP 400, wrapping that error's text. An unrecognizedprofile_idisn't checked byremove_profilebefore this tool ever reaches OctoBot: it's rejected locally asProfileNotFoundError(via the same pre-fetched scrape used to look upname, below) rather than let OctoBot's own uncaughtKeyErrorproduce an HTTP 500.
Extra safety check, not strictly required by OctoBot's own response
but added anyway: OctoBot's 200 success body for this action is the
same uninformative literal string "Profile created" copied from the
unrelated duplicate action (confirmed against source) -- not
"Profile deleted" or anything that actually confirms removal. Given
that copy-paste bug, this tool re-checks via the same scrape
list_profiles/get_profile use that profile_id is genuinely gone
afterward, raising ProfileDeleteRejectedError (not trusting the 200)
if it is still present.
The profile's name is captured from a scrape taken before deletion
(per this tool's spec entry), since after a real deletion it can no
longer be found by scraping.
Output on success: {"profile_id": str, "name": str, "deleted": true}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| profile_id | Yes |