Binance icon

Binance

Consume Binance API

Overview

This node integrates with the Binance Spot trading API to place orders on the spot market. It allows users to create 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 certain condition is met.
  • Selling a portion of an asset to take profits.
  • 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 orders.
Symbol Name or ID The trading pair symbol to operate on, e.g., BTCUSDT. Can be selected from a list or set via expression.
Quantity The amount of the asset to buy or sell. Not applicable if Side is "CLEAR".
Price The price at which to place the order. Not applicable if 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 applicable.

If the operation is "CLEAR", the output confirms cancellation of 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 provided credentials having sufficient permissions to place and cancel orders.
  • The "Symbol Name or ID" property uses a dynamic options loader method to fetch available trading pairs 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.
    • Using an incorrect symbol name or one not supported by Binance will result in 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 active.
    • Insufficient funds: Verify account balances before placing orders.
    • Invalid symbol: Confirm the symbol exists and is spelled correctly.
    • Order rejection due to price or quantity: Ensure values are positive and comply with Binance's minimums and increments.

Links and References

Discussion