select_profile
Activate a trading profile on OctoBot by profile ID. Verifies the selection actually took effect and raises an error if not, preventing silent failures.
Instructions
Select a profile as OctoBot's current/active profile.
Maps to GET /profile?select=<profile_id> (spec [V]).
Spec correction, verified against source
(controllers/configuration.py::profile()) and reproduced live: this
route always responds HTTP 200 with a full HTML page, whether or not
the selection actually happened -- an unknown profile_id makes
models.select_profile() raise NoProfileError, which the route
catches internally, flashes a warning ("The requested profile no
longer exists.") into an HTML-only, session-cookie-based flash message,
and re-renders the PREVIOUSLY-selected profile's page, still with a 200
status. There is no way to distinguish success from this silent-failure
case from the HTTP response alone. This tool therefore always
re-fetches the currently-selected profile afterward (the same scrape
list_profiles/get_profile use) and raises
ProfileSelectionFailedError if it doesn't match profile_id, rather
than trusting the 200 status.
Output: {"profile_id": str, "selected": true}. Idempotent (selecting
the already-selected profile is a verified no-op on OctoBot's side) and
not confirm-gated (ADR-0003).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile_id | Yes |