Gainium icon

Gainium

Operates with official Gainium API

Overview

This node integrates with the Gainium API to retrieve information related to user exchanges. Specifically, the "Get User Exchanges" operation fetches a list of exchanges associated with the authenticated user account. This can be useful for scenarios where you want to programmatically access and manage your trading exchange connections within automation workflows.

Practical examples include:

  • Automatically retrieving all connected exchanges to display or process in downstream workflow steps.
  • Using the exchange list to dynamically configure other operations such as fetching balances or placing trades on specific exchanges.
  • Monitoring which exchanges are linked to your Gainium account for audit or reporting purposes.

Properties

Name Meaning
Please refer to official documentation of Gainium API for request formats. A notice prompting users to consult the official Gainium API documentation for details on request formats.
Paper Whether to use paper trading (simulated environment) or real trading (live environment). Boolean value: true for paper trading, false for real trading.

Output

The output is a JSON object containing data about the user's exchanges retrieved from the Gainium API. The structure is:

{
  "data": [
    {
      // Exchange details (varies depending on Gainium API response)
    },
    ...
  ]
}
  • The data field is an array of exchange objects representing each exchange connected to the user.
  • Each exchange object includes properties as defined by the Gainium API (e.g., exchange name, ID, status).
  • 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 request authentication.
  • Requires network access to the Gainium API base URL configured in the credentials.
  • No additional external dependencies beyond standard HTTP requests and cryptographic functions available in the runtime environment.

Troubleshooting

  • Common issues:

    • Authentication errors if the API key or secret is incorrect or missing.
    • Network connectivity problems preventing access to the Gainium API.
    • Rate limiting or quota exceeded errors from the API.
    • Invalid parameter values, especially for the Paper property.
  • Error messages:

    • "Error: <reason>" — Indicates an error response from the Gainium API; check the reason message for details.
    • "HMAC generation failed: Web Crypto API not available" — Occurs if the runtime environment does not support required cryptographic functions; ensure environment supports Web Crypto API.
    • "Operation Get User Exchanges is not supported" — Means the operation name was not recognized; verify correct operation selection.
    • JSON parsing errors if input parameters contain invalid JSON (not applicable directly here but relevant for other operations).
  • Resolutions:

    • Verify API credentials and permissions.
    • Confirm network connectivity and API endpoint availability.
    • Use valid boolean values for the Paper property.
    • Consult Gainium API documentation for any changes or updates in endpoints or parameters.

Links and References

  • Gainium Official API Documentation (Please replace with actual URL)
  • Gainium API general usage and authentication guidelines.
  • n8n documentation on creating and using API credentials.

Discussion