Actions23
- General Actions
- Bots Actions
- Deals Actions
- User Actions
Overview
The "Archive Bot" operation in the Gainium node allows users to archive a trading bot on the Gainium platform via its official API. Archiving a bot typically means marking it as inactive or removed from active trading without deleting its data permanently. This operation is useful for managing bots that are no longer needed or temporarily paused, helping keep the active bot list clean and organized.
Practical scenarios include:
- Archiving a bot after a trading strategy has completed or is no longer profitable.
- Temporarily disabling a bot without losing its configuration.
- Managing multiple bots by archiving those not currently in use.
This operation requires specifying the bot type (Grid, DCA, or Combo), the unique bot ID, and whether the action applies to paper trading or real trading context.
Properties
| Name | Meaning |
|---|---|
| Bot Type | The type of bot to archive. Options: Grid, DCA, Combo. |
| Bot Id | The unique identifier of the bot to be archived. |
| Paper Trading | Boolean flag indicating whether to apply the operation in paper trading mode (true) or real trading mode (false). |
| Please refer to official documentation of Gainium API for request formats. | Notice to consult Gainium API docs for detailed request formats. |
| This operation requires write permission of API keys. | Notice that this operation needs API keys with write permissions. |
Output
The output JSON contains the response data from the Gainium API after attempting to archive the specified bot. Typically, this will include confirmation of the archive action or details about the bot's new status.
Example structure:
{
"data": {
// API response fields confirming archive success or failure
}
}
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential with write permissions to the Gainium API.
- The node uses HMAC SHA-256 signing for authentication headers.
- Requires network access to the Gainium API base URL configured in credentials.
- No additional external dependencies beyond the Gainium API and n8n HTTP request helper.
Troubleshooting
Common issues:
- Insufficient API key permissions: Ensure the API key used has write access enabled.
- Invalid bot ID or bot type: Verify the bot ID exists and matches the specified bot type.
- Network or connectivity errors: Confirm the Gainium API endpoint is reachable.
- Incorrect paper trading flag: Use
truefor paper trading bots andfalsefor live bots.
Error messages:
"Error: <reason>": Returned when the API responds with a failure reason; check the message for specifics."HMAC generation failed: Web Crypto API not available": Indicates environment does not support required cryptographic functions; ensure running in supported environment."Operation archive_bot is not supported": Means the operation name was not recognized; verify correct operation selection.
Links and References
- Gainium Official API Documentation (for detailed request/response formats and permissions)
- n8n HTTP Request Node Documentation (for understanding HTTP request handling in n8n)
This summary covers the static analysis of the "Archive Bot" operation within the Gainium node's execute method, focusing on input properties, output, dependencies, and potential troubleshooting tips.