Connect
Establishes a connection to the Binance cryptocurrency exchange using API credentials, creating a reusable client session for subsequent trading and data operations.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Options
- Api Key - Binance API key credential for authentication. Store this securely in Robomotion Vault.
- Secret Key - Binance API secret key credential for signing requests. Store this securely in Robomotion Vault.
Output
- Client Id - A unique identifier for the established connection that must be passed to other Binance nodes.
How It Works
The Connect node is the first step in any Binance automation workflow. It establishes a secure connection to Binance and creates a client session.
When executed, the node:
- Retrieves the API Key and Secret Key from the provided credentials
- Validates that both credentials are not empty
- Creates a new Binance client instance with the provided credentials
- Generates a unique client ID for the session
- Stores the client in memory for use by other nodes
- Returns the client ID for subsequent operations
Requirements
- A valid Binance account
- Binance API Key and Secret Key (created from Binance Account Settings > API Management)
- Both credentials stored in Robomotion Vault
- Appropriate API permissions enabled (e.g., spot trading, reading)
Error Handling
The node will return specific errors in the following cases:
- ErrCredentials - Failed to retrieve credentials from Vault
- ErrInvalidArg - API Key or Secret Key is empty
Usage Notes
- The Connect node should be executed before any other Binance operations
- The returned Client Id must be passed to all subsequent Binance nodes
- Each Connect node creates a new client session
- Always pair Connect with Disconnect to properly clean up resources
- The client session is stored in memory and automatically removed when the flow stops
Best Practices
- Store your Binance API credentials in Robomotion Vault, never hardcode them
- Use a single Connect node at the beginning of your flow
- Always pair Connect with Disconnect nodes to clean up resources
- Enable IP whitelist restrictions on your Binance API keys for security
- Grant only the minimum necessary permissions to your API keys
- Use read-only API keys for monitoring flows that don't need trading access
- For trading bots, avoid granting withdrawal permissions unless absolutely necessary
Security Considerations
- Enable two-factor authentication (2FA) on your Binance account
- Regularly rotate your API keys
- Monitor your API key usage in Binance account settings
- Set up IP address whitelisting to restrict API access
- Never share or expose your API credentials
- Use separate API keys for different automation purposes
Example Flow
[Connect] -> [Get Balance] -> [Get Price] -> [Buy Order] -> [Disconnect]
| ^
+--------------------------------------------------------------+
(Pass Client Id to all nodes)
Alternative Authentication
Starting from version 0.2.0, some Binance nodes support direct credential authentication without using the Connect node. You can provide API Key and Secret Key directly in those nodes' options. However, using the Connect node is recommended for:
- Better resource management
- Reusing the same client across multiple operations
- Cleaner flow design
- Easier credential updates