Actions10
- Spot Actions
- Future Actions
- Custom Actions
Overview
This node integrates with the Binance Spot trading API to place orders on the spot market. It allows users to submit buy, sell, or clear (cancel) orders for specified trading pairs (symbols). This is useful for automating cryptocurrency trading strategies, portfolio rebalancing, or executing trades based on external signals.
Practical examples:
- Automatically buying a specific quantity of BTCUSDT when a price threshold is met.
- Selling a portion of holdings in ETHUSDT as part of a profit-taking strategy.
- Clearing all open orders for a given symbol to manage risk or reset positions.
Properties
| Name | Meaning |
|---|---|
| Side | The type of order action: "BUY" to purchase, "SELL" to sell, or "CLEAR" to cancel existing orders. |
| Symbol Name or ID | The trading pair symbol to operate on (e.g., BTCUSDT). Can be selected from a list or provided via expression. |
| Quantity | The amount of the asset to buy or sell. Not applicable when Side is "CLEAR". |
| Price | The price at which to place the order. Not applicable when Side is "CLEAR". |
Output
The node outputs JSON data representing the response from the Binance API after placing or clearing an order. This typically includes details such as order ID, status, executed quantity, and any error messages if the operation failed.
If the operation is "CLEAR", the output reflects the result of cancelling open orders.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Binance API.
- The node depends on the Binance Spot API being accessible and the credentials having appropriate permissions for trading.
- The property "Symbol Name or ID" uses a dynamic method to load available symbols from Binance.
Troubleshooting
Common issues:
- Invalid or expired API keys will cause authentication errors.
- Insufficient balance errors may occur if trying to buy or sell more than available.
- Incorrect symbol names or unsupported trading pairs will lead to API errors.
- Attempting to place orders with zero or negative quantity/price will fail validation.
Error messages:
- Authentication failures: Check that the API key and secret are correctly configured and have trading permissions.
- Insufficient funds: Verify account balances before placing orders.
- Invalid symbol: Ensure the symbol exists and is supported by Binance Spot.
- Order rejected due to invalid parameters: Confirm quantity and price are positive numbers and comply with Binance's minimums and increments.
Links and References
- Binance Spot API Documentation
- n8n Expressions Documentation (for using expressions in properties)