Binance icon

Binance

Consume Binance API (v.0.1.9)

Overview

This node interacts with the Binance API to perform various trading-related operations, specifically focusing on order management such as placing new orders, canceling orders, querying orders, and managing OCO (One-Cancels-the-Other) orders. It is useful for automating trading workflows, managing open orders, and retrieving account trade information on Binance. For example, a user can cancel a specific order by providing the symbol and timestamp, optionally including order IDs or client order IDs for precise control.

Use Case Examples

  1. Cancel a specific order on Binance by specifying the trading symbol and timestamp, optionally including the order ID or client order ID.
  2. Retrieve all open orders for a given symbol and timestamp to monitor active trades.
  3. Place a new OCO order with specified parameters like symbol, side, quantity, price, and stop price.

Properties

Name Meaning
Symbol The trading pair symbol (e.g., BTCUSDT) for which the order operation is performed.
Timestamp The timestamp at which the operation is requested, used for request validation and timing.
Add Optional Operations Additional optional parameters for the cancel order operation, such as order ID, original client order ID, new client order ID, and receive window for request timing.

Output

JSON

  • symbol - The trading symbol related to the order operation.
  • timestamp - The timestamp of the operation request.
  • orderId - The unique identifier of the order involved in the operation, if applicable.
  • origClientOrderId - The original client order ID, if provided.
  • newClientOrderId - The new client order ID for the cancel request, if provided.
  • recvWindow - The receive window parameter indicating the allowed request time window.
  • response - The JSON response from the Binance API for the requested operation, containing order or account details.

Dependencies

  • Binance API with API key and secret for authentication

Troubleshooting

  • Ensure the API key and secret are correctly configured and have the necessary permissions for trading operations.
  • Verify that the timestamp parameter is accurate and synchronized with Binance server time to avoid request rejections.
  • Check that the symbol parameter matches a valid trading pair on Binance.
  • If using optional parameters like orderId or clientOrderId, ensure they correspond to existing orders to avoid errors.
  • Common error messages include authentication failures, invalid parameters, or rate limit exceeded; resolving these involves checking credentials, parameter correctness, and respecting API rate limits.

Links

Discussion