Overview
This node integrates with the Binance API to perform various operations related to futures trading. Specifically, the "Future" resource with the "Leverage" operation allows users to set or adjust the leverage for a selected futures trading symbol. This is useful for traders who want to control their exposure and risk by increasing or decreasing leverage on a particular futures contract.
Common scenarios include:
- Adjusting leverage before opening a new futures position.
- Modifying leverage dynamically based on market conditions or trading strategies.
- Automating risk management by setting leverage limits programmatically.
For example, a user might select the BTCUSDT futures symbol and set the leverage to 20 with an isolated margin type to limit risk to that position only.
Properties
| Name | Meaning |
|---|---|
| Symbol Name or ID | The futures trading symbol to apply leverage on. Choose from a list or specify via expression. |
| Leverage | The leverage multiplier to set, ranging from 1 to 75. |
| Margin Type | The margin mode for the position: either "ISOLATED" (margin limited to the position) or "CROSSED" (shared margin across positions). |
Output
The node outputs JSON data representing the result of the leverage adjustment request to Binance. This typically includes confirmation details such as the symbol, updated leverage value, margin type, and any status messages returned by the Binance API.
If the node supports binary data output, it would generally relate to raw API response payloads or logs, but this is not indicated in the provided code.
Dependencies
- Requires a valid Binance API key credential configured in n8n for authentication.
- Depends on the Binance API being accessible and the user’s account having permission to modify futures leverage.
- Uses internal methods for loading available symbols dynamically.
Troubleshooting
- Invalid Symbol: If the symbol is not recognized or unsupported, the node may return an error. Ensure the symbol is correctly selected or specified.
- Leverage Out of Range: Setting leverage outside the allowed range (1-75) will cause errors. Use values within the specified bounds.
- Margin Type Errors: Providing an invalid margin type will result in failure. Use only "ISOLATED" or "CROSSED".
- API Authentication Failures: Incorrect or missing API credentials will prevent execution. Verify API keys and permissions.
- Rate Limits: Binance enforces rate limits; excessive requests may lead to temporary blocking.