Overview
This node integrates with the dYdX v4 API, a decentralized exchange platform for perpetual contracts and margin trading. It supports multiple operations including transferring funds between subaccounts, placing orders, retrieving market data, managing positions, and more.
The Transfer Between Subaccounts operation specifically allows users to move funds from one subaccount to another within their dYdX account. This is useful for managing capital allocation across different trading strategies or segregating funds for risk management.
Practical examples:
- A trader wants to allocate a portion of their funds from a main subaccount to a subaccount dedicated to automated trading bots.
- An asset manager redistributes capital among client subaccounts based on performance or strategy changes.
Properties
| Name | Meaning |
|---|---|
| From Subaccount | Source subaccount ID from which the amount will be transferred. |
| To Subaccount | Destination subaccount ID to which the amount will be transferred. |
| Amount | The quantity of funds to transfer, specified as a number (likely in smallest currency unit). |
Output
The output JSON object for the transfer operation contains:
success: A boolean indicating if the transfer was successful (true).tx: The transaction identifier or hash confirming the transfer on the blockchain or platform.
Example output:
{
"success": true,
"tx": "0x123abc456def..."
}
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating with the dYdX v4 API.
- The node uses internal services to interact with the dYdX network, including trading and account services.
- Network configuration and user address are required from credentials.
- No additional external dependencies beyond the dYdX API and n8n environment.
Troubleshooting
Common issues:
- Invalid subaccount IDs may cause the transfer to fail.
- Insufficient balance in the source subaccount will prevent the transfer.
- Network or API authentication errors if credentials are incorrect or expired.
Error messages:
"Failed to execute smart position: ..."(not directly related to transfer but indicates how errors are handled).- For transfer-specific failures, the node throws errors that can be caught by enabling "Continue On Fail" to handle gracefully.
Resolution tips:
- Verify subaccount IDs exist and belong to the authenticated user.
- Ensure sufficient funds are available in the source subaccount.
- Confirm API credentials are valid and have necessary permissions.
- Enable "Continue On Fail" to capture errors without stopping workflow execution.