Actions23
- General Actions
- Bots Actions
- Deals Actions
- User Actions
Overview
The "Restore Bot" operation in the Gainium node allows users to restore a previously stopped or archived trading bot on the Gainium platform. This is useful when you want to reactivate a bot with its prior configuration and state without creating a new one from scratch.
Typical scenarios include:
- Restarting a bot that was paused for market conditions.
- Recovering a bot after temporary suspension or archival.
- Managing bot lifecycle programmatically within automated workflows.
For example, if you have a Grid, DCA, or Combo bot that you stopped during volatile market periods, you can use this operation to restore it and resume trading seamlessly.
Properties
| Name | Meaning |
|---|---|
| Bot Type | The type of bot to restore. Options: Grid, DCA, Combo. |
| Bot Id | The unique identifier of the bot to restore. |
| Paper Trading | Boolean flag indicating whether to restore the bot in paper trading mode (simulated) or real trading mode. |
Additionally, there are informational notices reminding users to refer to official Gainium API documentation for request formats and that write permissions on API keys are required for this operation.
Output
The output JSON contains the response data from the Gainium API after attempting to restore the bot. It typically includes details about the restored bot's status and configuration as returned by the /api/restoreBot endpoint.
The structure is:
{
"data": {
// Bot restoration result details, e.g., success status, bot info
}
}
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for Gainium with write permissions enabled.
- The node uses HMAC SHA-256 signing for authentication headers.
- Requires network access to the Gainium API base URL configured in credentials.
- Uses n8n's HTTP Request helper to communicate with the Gainium REST API.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Insufficient API key permissions (write access) will prevent restoring bots.
- Incorrect Bot Id or Bot Type parameters may lead to "not found" or "operation not supported" errors.
- Network connectivity problems or incorrect base URL configuration can cause request failures.
Error messages:
"Error: <reason>"— Generic error returned from the Gainium API; check the reason message for specifics."HMAC generation failed: Web Crypto API not available"— Indicates environment does not support required cryptographic functions."Operation Restore Bot is not supported"— Occurs if the operation parameter is incorrect or unsupported.
Resolutions:
- Verify API credentials and ensure they have write permissions.
- Double-check Bot Id and Bot Type inputs.
- Confirm network connectivity and correct API base URL.
- Ensure the runtime environment supports Web Crypto API for signature generation.
Links and References
- Gainium Official API Documentation (refer to for detailed request/response formats)
- Gainium Bot Management Guide
- n8n HTTP Request Node Documentation: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/
This summary covers the static analysis of the Gainium node's "Restore Bot" operation based on the provided source code and input properties.