Binance icon

Binance

Consume Binance API

Overview

This custom node is designed to interact with the Binance API, allowing users to execute predefined or custom functions on the Binance platform. It is particularly useful for automating cryptocurrency trading tasks, retrieving market data, managing account information, or executing any other Binance API-supported operations programmatically within an n8n workflow.

A common scenario includes running a specific Binance API function by specifying its name or ID and providing the necessary parameters in JSON format. For example, a user might want to fetch the current price of a cryptocurrency pair or place an order by calling the corresponding Binance API function through this node.

Properties

Name Meaning
Function Name or ID Select a predefined Binance API function from a list or specify a function ID using an expression.
Parameters Provide the parameters required by the selected Binance function in JSON format.

Output

The node outputs the result of the executed Binance API function in the json field of the output data. This typically contains the response data returned by the Binance API call, such as market data, order details, or account information depending on the function executed.

If the Binance API function returns binary data (e.g., files or images), the node would include this in the binary output; however, based on the provided code and properties, the primary output is JSON-formatted data representing the API response.

Dependencies

  • Requires an active Binance API key credential configured in n8n to authenticate requests.
  • Depends on the bundled Binance API client methods and execution logic (./methods, ./actions/binance.execute) which handle communication with the Binance API.
  • The node uses dynamic loading of available Binance functions via a method named getCustomFunctions.

Troubleshooting

  • Invalid Function Name or ID: If the specified function name or ID does not exist or is misspelled, the node may fail to execute. Ensure the function is correctly selected from the list or properly referenced via expression.
  • Malformed Parameters JSON: Providing invalid JSON in the Parameters field will cause parsing errors. Validate JSON syntax before execution.
  • Authentication Errors: Missing or incorrect Binance API credentials will prevent successful API calls. Verify that the API key is correctly set up in n8n.
  • API Rate Limits: Binance enforces rate limits; excessive requests may lead to temporary blocking. Implement appropriate delays or error handling.
  • Network Issues: Connectivity problems can cause request failures. Check network status and retry if needed.

Links and References

Discussion