manage_bot
Start, stop, archive, restore, or change trading pairs on your Gainium bots. Supports DCA, combo, and grid types with configurable close options.
Instructions
Manage bot lifecycle: start, stop, archive, restore, or change trading pairs (DCA only). Each action has specific requirements.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform on the bot | |
| botId | Yes | Bot identifier. Accepts EITHER the bot's 24-character hex MongoDB ObjectId (e.g. "65f000000000000000000001") OR the bot's UUID (e.g. "550e8400-e29b-41d4-a716-446655440000"). Either form resolves to the same bot — use whichever the bot record exposes. Get both from list_bots (the `_id` and `uuid` fields). | |
| botType | Yes | Bot type | |
| paperContext | No | Paper trading context (true = paper, false = real). Default: false | |
| closeType | No | Close type for stop action (dca/combo). "closeByMarket" closes all positions, "leave" pauses the bot. | |
| closeGridType | No | Close type for stop action (grid only) | |
| cancelPartiallyFilled | No | Whether to cancel partially filled orders when stopping (optional) | |
| pair | No | Full replacement set of trading pairs for changePairs action (DCA, multi-pair bots only). Underscore format, e.g. ["BTC_USDT","ETH_USDT"]. Replaces all existing pairs. Single-coin bots reject pair changes. |