Binance icon

Binance

Consume Binance API (v.0.1.9)

Overview

This node interacts with the Binance API to perform various operations related to user data on orders, including querying all OCO (One Cancels the Other) orders. It supports operations such as querying orders, current open orders, all orders, OCO orders, account information, and trade lists. The node is useful for users who want to automate and manage their Binance trading activities programmatically, such as retrieving detailed order histories or managing open orders.

Use Case Examples

  1. A user wants to retrieve all OCO orders within a specific time range to analyze their trading strategy.
  2. A trader needs to fetch current open orders to monitor active trades and make decisions accordingly.
  3. An automated system queries account information and trade lists to update a portfolio dashboard.

Properties

Name Meaning
Timestamp The timestamp parameter used for the API request, typically representing the current time or a specific point in time for querying data.
Add Optional Operations A collection of optional parameters that can be added to the query, such as formId, startTime, endTime, limit, and recvWindow, to refine the API request for querying all OCO orders.

Output

JSON

  • symbol - The trading symbol related to the order or query.
  • orderId - The unique identifier for the order.
  • orderListId - The unique identifier for the OCO order list.
  • clientOrderId - The client-generated identifier for the order.
  • price - The price specified for the order.
  • stopPrice - The stop price specified for the OCO order.
  • status - The current status of the order (e.g., NEW, FILLED, CANCELED).
  • type - The type of order (e.g., LIMIT, MARKET).
  • side - The side of the order (BUY or SELL).
  • timestamp - The timestamp when the order or query was made.

Dependencies

  • Binance API with API key and secret for authentication

Troubleshooting

  • Common issues include invalid or expired API keys, resulting in authentication errors. Ensure API credentials are correctly configured and have the necessary permissions.
  • Incorrect or missing required parameters such as timestamp can cause the API request to fail. Verify all required fields are provided and correctly formatted.
  • Rate limits imposed by Binance API may cause requests to be rejected. Implement retry logic or reduce request frequency to avoid hitting limits.
  • Errors related to date/time parameters (startTime, endTime) may occur if they are not properly formatted or if formId is used simultaneously with startTime or endTime, which is not allowed.

Links

Discussion