Binance icon

Binance

Consume Binance API

Overview

This node integrates with the Binance API to manage futures orders. It allows users to place buy or sell orders, clear all existing orders, or retrieve open orders for a specified futures trading symbol. This is useful for automating trading strategies, managing positions programmatically, or monitoring order status on Binance Futures.

Common scenarios include:

  • Automatically placing buy or sell orders based on market signals.
  • Clearing all outstanding orders before executing new trades.
  • Fetching current open orders to track active positions or for reconciliation.

Example: A user can configure the node to place a buy order of 10 contracts at a specific price for the BTCUSDT futures symbol, or fetch all open orders to display in a dashboard.

Properties

Name Meaning
Side The type of order action to perform. Options: "BUY" (place a buy order), "SELL" (place a sell order), "Clear Orders" (cancel all open orders), "Open Orders" (retrieve all open orders).
Symbol Name or ID The futures trading symbol to operate on (e.g., BTCUSDT). Can be selected from a list or specified dynamically via expression.
Quantity The number of contracts to buy or sell. Required when placing buy or sell orders. Not applicable for clearing or fetching orders.
Price The price at which to place the order. Required when placing buy or sell orders. Not applicable for clearing or fetching orders.
Reduce Only Boolean flag indicating if the order should only reduce an existing position (true) or not (false). Applies only to buy/sell orders.

Output

The node outputs JSON data representing the result of the requested operation:

  • For BUY or SELL operations, the output contains details of the placed order such as order ID, status, executed quantity, and price.
  • For Clear Orders, the output confirms cancellation of all open orders.
  • For Open Orders, the output lists all currently open orders for the specified symbol, including their IDs, quantities, prices, and statuses.

If the node supports binary data (not evident from the provided code), it would typically represent any file or media returned by the API, but this node primarily deals with JSON order data.

Dependencies

  • Requires an API key credential for Binance API access configured in n8n.
  • Depends on the Binance Futures API being accessible and the credentials having appropriate permissions.
  • Uses internal methods and properties loaded from bundled dependencies (./methods, ./actions/binance.properties, ./actions/binance.execute).

Troubleshooting

  • Invalid API credentials: Ensure the Binance API key and secret are correctly set up and have futures trading permissions.
  • Symbol not found: Verify that the symbol name or ID is valid and supported by Binance Futures.
  • Order rejected or failed: Check if the quantity and price values meet Binance's minimum requirements and that the account has sufficient balance.
  • Network or API errors: Confirm network connectivity and Binance API status.
  • Operation mismatch: Using quantity or price fields with "Clear Orders" or "Open Orders" operations will be ignored; ensure correct property usage.

Links and References

Discussion