Actions23
- General Actions
- Bots Actions
- Deals Actions
- User Actions
Overview
This node operation updates the settings of a DCA (Dollar-Cost Averaging) bot on the Gainium platform via its official API. It allows users to modify various parameters of an existing DCA bot, such as trading pairs, order sizes, stop loss and take profit percentages, reinvestment options, cooldown intervals, and other advanced trading configurations.
Typical use cases include:
- Adjusting bot behavior dynamically based on market conditions without recreating the bot.
- Fine-tuning risk management settings like stop loss, trailing stops, and multi-target take profits.
- Enabling or disabling features such as smart orders, reinvestment, or cooldown periods.
- Switching between paper trading and real trading environments for testing or live deployment.
For example, a trader might update their DCA bot to increase the number of open deals allowed or change the pairs it trades on, all through this node.
Properties
| Name | Meaning |
|---|---|
| Bot Id | The unique identifier of the DCA bot whose settings are to be updated. |
| Bot Settings | A JSON object containing the new configuration for the DCA bot. This includes fields such as name, pair (trading pairs), ordersCount, tpPerc (take profit percentage), slPerc (stop loss percentage), and many more detailed settings. Users should refer to the Gainium API documentation for the exact schema and field meanings. |
| Paper Trading | Boolean flag indicating whether the update applies to a paper trading (simulated) environment (true) or real trading environment (false). |
Note: The "Bot Settings" property expects a JSON string that must conform to the Gainium API's expected schema for DCA bot settings.
Output
The node outputs a JSON object representing the response from the Gainium API after attempting to update the DCA bot settings. Typically, this will include confirmation of the update or details about the updated bot configuration.
The output structure is:
{
"data": {
// API response data confirming the update or providing updated bot details
}
}
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating with the Gainium API.
- The node uses HMAC SHA-256 signing for request authentication.
- The Gainium API base URL and credentials must be configured in n8n.
- The user must have write permissions on their API keys to perform this operation.
Troubleshooting
- Invalid JSON in Bot Settings: If the JSON provided in the "Bot Settings" property is malformed or does not match the expected schema, the API may reject the request. Validate the JSON format and refer to the Gainium API docs for correct field names and types.
- Authentication Errors: Ensure the API key credential is correctly set up and has write permissions; otherwise, the API will deny the update request.
- Permission Denied: The operation requires write access to API keys. Lack of proper permissions will result in errors.
- API Errors: The node throws errors if the API returns a status of "NOTOK" with a reason message. Review the error message for specific issues such as invalid parameters or rate limits.
- Network Issues: Connectivity problems can cause request failures. Verify network access to the Gainium API endpoint.
Links and References
- Gainium API Documentation — For detailed information on the DCA bot settings schema and API usage.
- Gainium Official Website — Platform homepage and support resources.