Gainium icon

Gainium

Operates with official Gainium API

Overview

The "Start Bot" operation in this Gainium API node allows users to start a trading bot of a specified type (Grid, DCA, or Combo) on the Gainium platform. This operation is useful for automating cryptocurrency trading strategies by activating bots that execute trades based on predefined parameters.

Typical scenarios include:

  • Activating a Grid bot to trade within a price range using grid trading strategy.
  • Starting a DCA (Dollar Cost Averaging) bot to invest fixed amounts at regular intervals.
  • Launching a Combo bot that combines multiple trading strategies.

Practical example: A user who has configured a Grid bot with specific trading pairs and settings can use this node operation to start the bot either in real trading mode or paper trading mode (simulated trading without real funds).

Properties

Name Meaning
Bot Type The type of bot to start. Options: Grid, DCA, Combo.
Bot Id The unique identifier of the bot to start.
Paper Trading Boolean flag indicating whether to use paper trading (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 permission on API keys is required for this operation.

Output

The output JSON contains the response data from the Gainium API after attempting to start the bot. It typically includes confirmation details about the started bot or error information if the operation failed.

The structure is:

{
  "data": {
    // API response fields confirming bot start status
  }
}

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential with write permissions to authenticate requests to the Gainium API.
  • The node uses HMAC SHA-256 signing for request authentication.
  • Requires network access to the Gainium API base URL configured in the credentials.
  • The node depends on n8n's HTTP Request helper for making API calls.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Insufficient API key permissions (missing write access) will prevent starting bots.
    • Incorrect Bot Id or Bot Type values may result in errors from the API.
    • Network connectivity problems can cause request timeouts or failures.
  • Error messages:

    • "Error: <reason>" — indicates an API-level error; check the reason message for details.
    • "HMAC generation failed: Web Crypto API not available" — indicates cryptographic functions needed for signing are unavailable; ensure environment supports Web Crypto API.
    • "Operation Start Bot is not supported" — means the operation name was not recognized; verify correct operation selection.
  • Resolutions:

    • Verify API credentials and their permissions.
    • Confirm Bot Id and Bot Type inputs are correct and correspond to existing bots.
    • Ensure the environment supports necessary cryptographic APIs.
    • Check network connectivity and API endpoint accessibility.

Links and References

Discussion