Actions23
- General Actions
- Bots Actions
- Deals Actions
- User Actions
Overview
This node interacts with the Gainium API to retrieve and manage trading bots, specifically focusing on "Grid Bots" for the provided resource and operation. It allows users to fetch a list of their grid bots filtered by status and trading context (paper or real trading). This is useful for traders who want to monitor or analyze their active, closed, archived, or errored grid bots programmatically within an n8n workflow.
Typical use cases include:
- Automatically retrieving all open grid bots to monitor performance.
- Fetching archived or error-status bots for auditing or troubleshooting.
- Paginating through large sets of bots when not returning all at once.
- Switching between paper trading and live trading contexts to separate testing from real trades.
Properties
| Name | Meaning |
|---|---|
| Status | Filter bots by their status. Options: Open, Closed, Archive, Error, Range |
| Page Number | The page number to retrieve when pagination is used (ignored if "Return All" is enabled) |
| Paper Trading | Boolean flag indicating whether to use paper trading (true) or real trading (false) |
| Return All | Boolean flag to return all results across pages or just a single page |
| Please refer to official documentation of Gainium API for request formats. | Informational notice directing users to Gainium API docs for detailed request formats |
Output
The output JSON contains a data field which holds the retrieved bots information. Depending on the API response structure, this can be:
- An object with either:
result: an array of bot objects (when the API returns aresultfield)items: an array of bot objects (when the API returns anitemsfield)
- The total count of returned bots is also included as
totalResultsoritemsCount.
Example output structure:
{
"data": {
"result": [ /* array of grid bot objects */ ],
"totalResults": 42
}
}
or
{
"data": {
"items": [ /* array of grid bot objects */ ],
"itemsCount": 42
}
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the Gainium API.
- The node uses HMAC SHA-256 signing for requests, relying on the Web Crypto API available in the environment.
- Network access to the Gainium API base URL configured in the credentials.
- Proper configuration of the Gainium API credential in n8n with base URL, token, and secret.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Incorrect status filter values may result in empty responses.
- Pagination parameters must be correctly set when "Return All" is false; otherwise, only the first page is fetched.
- The Web Crypto API must be available in the runtime environment for HMAC signature generation.
Error messages:
"Error: <reason>"— indicates an API-level error returned by Gainium, such as invalid parameters or server errors."HMAC generation failed: Web Crypto API not available"— means the environment does not support required cryptographic functions; ensure running in a compatible environment."Invalid JSON in filterModel: ..."— occurs if JSON input parameters are malformed (not applicable directly here but relevant for other operations).
Resolutions:
- Verify API credentials and permissions.
- Check that the status parameter matches one of the allowed options.
- Enable "Return All" to avoid manual pagination unless specific page control is needed.
- Run n8n in an environment supporting Web Crypto API (modern Node.js versions or browsers).
Links and References
- Gainium API Official Documentation: Refer to the Gainium API docs for detailed request and response formats, especially for bots endpoints.
- n8n HTTP Request Node Documentation: For understanding how HTTP requests and authentication work within n8n.
- Web Crypto API Documentation: https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API
This summary covers the "Get User Grid Bots" operation under the "Bots" resource, describing its inputs, outputs, dependencies, and common troubleshooting tips based on static analysis of the node's source code.