Overview
This node integrates with the dYdX v4 API to perform various operations related to decentralized trading and account management. Specifically, the "Transfer Between Subaccounts" operation allows users to move funds from one subaccount to another within their dYdX account structure. This is useful for managing balances across different trading strategies or segregating funds for risk management.
Practical examples include:
- Moving collateral or assets between subaccounts to allocate margin for different trading bots.
- Consolidating funds from multiple subaccounts into a single one before withdrawal.
- Distributing profits or losses among subaccounts after trading sessions.
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 between the specified subaccounts (in base units). |
Output
The output JSON object for the "Transfer Between Subaccounts" operation contains:
success: A boolean indicating whether the transfer was successful (true).tx: A transaction identifier or hash representing the executed transfer on the blockchain or dYdX network.
Example output:
{
"success": true,
"tx": "0x123abc456def..."
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the dYdX v4 API.
- The node internally uses services for trading and account management initialized with network configuration and user address derived from credentials.
- Proper network configuration and access permissions are necessary to interact with the dYdX API.
Troubleshooting
Common issues:
- Invalid 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 incorrect or expired.
Error messages:
- Errors thrown during execution will contain descriptive messages. If "Continue On Fail" is enabled, these errors will be returned as part of the output JSON under the
errorfield. - Typical error resolution involves verifying subaccount IDs, ensuring sufficient funds, and checking API credential validity.
- Errors thrown during execution will contain descriptive messages. If "Continue On Fail" is enabled, these errors will be returned as part of the output JSON under the