Binance icon

Binance

Consume Binance API

Actions7

Overview

This n8n custom node allows you to interact with the Binance API for futures trading, specifically to place and manage orders. It supports creating buy/sell orders, clearing all open orders, or retrieving current open orders for a selected futures symbol. This node is useful in automated trading workflows, such as:

  • Placing market or limit orders on Binance Futures.
  • Programmatically managing (clearing) all open orders for a symbol.
  • Fetching open orders for monitoring or further processing.

Example scenarios:

  • Automatically placing a BUY order when a trading signal is received.
  • Clearing all open orders before a scheduled maintenance window.
  • Retrieving open orders to log or analyze them in real time.

Properties

Name Type Meaning
Side options The action to perform: BUY, SELL, Clear Orders (CLEAR), or Open Orders (GET).
Symbol Name or ID options The futures trading pair (symbol) to act upon. Can be chosen from a list or specified via an expression.
Quantity number The amount of the asset to buy or sell. Required for BUY/SELL actions.
Price number The price at which to place the order. Required for BUY/SELL actions.
Reduce Only boolean If true, the order will only reduce an existing position. Used for BUY/SELL actions.

Note: "Quantity", "Price", and "Reduce Only" are hidden when "Side" is set to "Clear Orders" or "Open Orders".

Output

The output structure depends on the selected "Side":

  • BUY/SELL: Returns details of the placed order, such as order ID, status, symbol, quantity, price, etc.
  • Clear Orders: Returns confirmation of cleared orders, possibly including a summary of affected orders.
  • Open Orders: Returns a list of currently open orders for the selected symbol, each with its details.

If binary data is returned (unlikely for this operation), it would represent raw API responses or files, but typically the output is JSON.

Dependencies

  • External Service: Requires access to the Binance API (Futures).
  • API Credentials: You must configure valid Binance API credentials (binanceApi) in your n8n instance.
  • Environment: No special environment variables are required beyond standard n8n credential setup.

Troubleshooting

  • Invalid API Key/Secret:
    Error message: "Invalid API-key, IP, or permissions for action."
    Resolution: Ensure your Binance API credentials are correct and have the necessary permissions for futures trading.

  • Insufficient Balance:
    Error message: "Account has insufficient balance for requested action."
    Resolution: Check your account balance and ensure sufficient funds are available.

  • Invalid Symbol:
    Error message: "Invalid symbol."
    Resolution: Verify that the symbol exists and is supported for futures trading.

  • Order Parameter Errors:
    Error message: "Quantity must be greater than zero." or "Price must be greater than zero."
    Resolution: Ensure you provide valid numeric values for quantity and price when placing orders.

  • Network/API Issues:
    Error message: "Network error" or "Timeout."
    Resolution: Check your network connection and Binance API status.

Links and References

Discussion