Actions23
- General Actions
- Bots Actions
- Deals Actions
- User Actions
Overview
The "Get User Deals" operation of the Gainium node retrieves deal information associated with a user’s trading bots on the Gainium platform. It supports filtering deals by status, bot type, and other optional parameters, and can paginate through results or return all available deals automatically.
This node is useful for traders or automated trading systems that want to monitor, analyze, or manage their active or historical deals programmatically. For example, it can be used to fetch all open DCA (Dollar-Cost Averaging) bot deals in real trading mode or retrieve closed combo bot deals for reporting purposes.
Properties
| Name | Meaning |
|---|---|
| Paper Trading | Whether to use paper trading (simulated environment) or real trading |
| Bot Type | The type of bot to filter deals by; options: DCA, Combo |
| Status | Status of deals to filter by; options: Closed, Open, Error, Start, Canceled |
| Return All Items | Whether to return all items by automatically paginating through results |
| Page Number | Page number for paginated results (used if Return All Items is false) |
| Additional Options | Collection of additional filters: |
| - Bot ID | Filter deals by specific bot ID |
| - Terminal | Boolean flag to filter deals by terminal status |
Note: The property "Please refer to official documentation of Gainium API for request formats." is a notice and does not affect execution.
Output
The output JSON contains a data field which holds the retrieved deals. Depending on the API response structure, this data may be under keys like items, result, or nested arrays within the response. When pagination is enabled, the output includes either:
- An object with
resultarray andtotalResultscount, or - An object with
itemsarray anditemsCountcount.
Each item in these arrays represents a deal with its details as provided by the Gainium API.
The node does not output binary data for this operation.
Dependencies
- Requires an API key credential for authenticating with the Gainium API.
- Uses HMAC SHA-256 signing for request authentication.
- Requires network access to the Gainium API base URL configured in credentials.
- Pagination and filtering depend on Gainium API support and correct parameter usage.
Troubleshooting
Common Issues:
- Incorrect or missing API credentials will cause authentication failures.
- Invalid filter values (e.g., unsupported status or bot type) may result in empty responses or errors.
- Network connectivity issues can prevent successful API calls.
- Improper JSON formatting in additional fields (if extended) could cause parsing errors.
Error Messages:
"Error: <reason>"indicates an error returned from the Gainium API, where<reason>describes the issue."HMAC generation failed: Web Crypto API not available"means the environment does not support required cryptographic functions."Operation Get User Deals is not supported"would indicate a misconfiguration or unsupported operation selection.
Resolutions:
- Verify API credentials and permissions.
- Confirm filter parameters against Gainium API documentation.
- Ensure the n8n environment supports Web Crypto API (modern Node.js versions).
- Check network connectivity and proxy settings if applicable.
Links and References
- Gainium Official API Documentation (user should refer here for detailed request/response formats and parameters)