Overview
This node integrates with the dYdX v4 API to perform various operations related to trading and account management on the dYdX platform. Specifically, for the "Transfer Between Subaccounts" operation, it enables users to transfer a specified amount of funds from one subaccount to another within the same dYdX account.
Common scenarios where this node is beneficial include:
- Managing fund allocation across multiple subaccounts for risk management or strategy separation.
- Automating internal transfers between subaccounts without manual intervention.
- Integrating dYdX subaccount fund transfers into broader workflow automations.
Practical example:
- A user wants to move 100 USDC (represented as 100000000 in smallest units) from subaccount ID 0 to subaccount ID 1 automatically after certain trading conditions are met.
Properties
| Name | Meaning |
|---|---|
| From Subaccount | Source subaccount ID from which the funds will be transferred. |
| To Subaccount | Destination subaccount ID to which the funds will be transferred. |
| Amount | Amount to transfer, expressed in the smallest unit (e.g., 100000000 might represent 100). |
Output
The output JSON object for the "Transfer Between Subaccounts" operation contains:
success: A boolean indicating whether the transfer was successful (true).tx: The transaction details or identifier returned by the dYdX API representing the executed transfer.
Example output:
{
"success": true,
"tx": {
/* transaction details */
}
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the dYdX v4 API.
- Uses network configuration and address information from the provided credentials.
- Relies on internal trading and account service classes to interact with the dYdX API.
Troubleshooting
Common issues:
- Incorrect subaccount IDs may cause the transfer to fail.
- Insufficient balance in the source subaccount will prevent the transfer.
- Network or authentication errors if API credentials are invalid or expired.
Error messages:
- Errors thrown during transfer will be surfaced as node execution errors unless "Continue On Fail" is enabled.
- Typical error message:
"Failed to execute smart position: <error message>"(for other operations). - For transfer-specific failures, the error message will reflect the underlying API response, such as insufficient funds or invalid subaccount.
Resolution:
- Verify that the subaccount IDs exist and are correct.
- Ensure the source subaccount has sufficient funds.
- Confirm that the API credentials are valid and have necessary permissions.
- Enable "Continue On Fail" to handle errors gracefully in workflows.