Gainium icon

Gainium

Operates with official Gainium API

Overview

The "Clone Combo Bot" operation in this node allows users to create a duplicate of an existing combo trading bot on the Gainium platform with new settings. This is useful for quickly replicating and modifying bot configurations without manually recreating them from scratch.

Typical use cases include:

  • Quickly testing variations of a successful combo bot strategy by cloning it and adjusting parameters.
  • Backing up current bot configurations before making changes.
  • Deploying multiple similar bots with slight differences in settings.

For example, a user might clone a combo bot that trades BTC/USDT with specific grid and order settings, then modify the cloned bot’s name or trading pairs to experiment with different market conditions.

Properties

Name Meaning
Bot Id The unique identifier of the combo bot to be cloned. This is required to specify which existing bot will be duplicated.
Bot Settings A JSON object containing the new settings for the cloned bot. Users should refer to the official Gainium API documentation for the exact schema and field names. This includes parameters like name, trading pairs, order sizes, risk reduction options, cooldowns, and more.
Paper Trading Boolean flag indicating whether the cloned bot should operate in paper trading mode (simulated trading) or real trading mode.

Note: There are also caution notices reminding users that this operation requires write permissions on API keys and to consult official documentation for request formats.

Output

The output of this operation is a JSON object representing the response from the Gainium API after cloning the combo bot. It typically contains details about the newly created bot instance, such as its ID, status, and configuration summary.

The json output field structure generally looks like:

{
  "data": {
    // Details of the cloned combo bot returned by the API
  }
}

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential with write permissions to interact with the Gainium API.
  • The node uses Gainium's official REST API endpoints for bots.
  • The node signs requests using HMAC SHA-256 with the provided secret key.
  • Requires proper configuration of the Gainium API base URL, token, and secret in n8n credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing Bot Id: Ensure the Bot Id corresponds to an existing combo bot.
    • Malformed JSON in Bot Settings: The botSettings property must be valid JSON matching Gainium API schema.
    • Insufficient API permissions: The API key must have write access to perform cloning.
    • Network or authentication errors: Check API credentials and network connectivity.
  • Error messages:

    • "Error: <reason>": Returned when the API responds with an error reason; verify the request parameters and API key permissions.
    • "HMAC generation failed: Web Crypto API not available": Indicates cryptographic functions are unavailable; ensure the environment supports Web Crypto API.
    • "Invalid JSON in filterModel": If JSON parsing fails in other operations, check JSON formatting carefully.

To resolve errors, verify all input parameters, ensure correct API credentials with necessary permissions, and consult Gainium API documentation for valid request formats.

Links and References

Discussion