Trading Executor
Use the Trading Executor node to execute buy, sell, and close position trading operations on cryptocurrency exchanges. This node handles order placement, execution, and position management with advanced options for slippage control, retry logic, and leverage.
Operations
- Execute Buy: Open a long position or buy assets
- Execute Sell: Open a short position or sell assets
- Close Position: Close existing positions (all, partial, or percentage-based)
Execute Buy
Executes a buy order to open a long position or purchase assets. For spot trading, this purchases the base currency. For futures/margin trading, this opens a long position.
Execute Buy parameters
-
Exchange: The exchange on which to execute the trade. If not specified, the default exchange is used.
-
Symbol: The trading symbol code. Leave empty to use the default symbol configured in the exchange settings.
-
Amount: The amount to buy. For spot trading, this represents the amount of base currency. For futures, this represents the position size in contracts or base currency.
-
Comment: An optional comment or tag to attach to this trade for tracking purposes. Useful for identifying trades in logs and reports.
Execute Sell
Executes a sell order to open a short position or sell assets. For spot trading, this sells the base currency. For futures/margin trading, this opens a short position.
Execute Sell parameters
-
Exchange: The exchange on which to execute the trade. If not specified, the default exchange is used.
-
Symbol: The trading symbol code. Leave empty to use the default symbol.
-
Amount: The amount to sell. For spot trading, this represents the amount of base currency. For futures, this represents the position size in contracts or base currency.
-
Comment: An optional comment or tag to attach to this trade for tracking purposes.
Close Position
Closes an existing position. Supports closing all positions, a specific amount, or a percentage of the position. This operation is primarily used for futures/margin trading.
Close Position parameters
-
Exchange: The exchange on which to close the position. If not specified, the default exchange is used.
-
Symbol: The trading symbol code. Leave empty to use the default symbol.
-
Close Option:
Available options:
- Close All: Closes the entire position
- Specific Amount: Closes a specific amount of the position
- Percentage: Closes a percentage of the position
-
Close Amount: The specific amount to close (only used when Close Option is "Specific Amount")
-
Close Percentage: The percentage to close (e.g., 50 for 50%) (only used when Close Option is "Percentage")
-
Comment: An optional comment for tracking this close operation.
Node Options
You can configure advanced trading options to fine-tune execution behavior:
Slippage
- Default: 2
- Description: Maximum acceptable price slippage in minimum price units (pips). Prevents execution at unfavorable prices.
- Example: Set to 10 to allow up to 10 pips of slippage
- Use case: Protects against volatile price movements during order execution
Fee Rate
- Default: 0.001
- Description: Trading fee rate as a decimal (e.g., 0.001 for 0.1% fee)
- Use case: Overrides default fee calculations for custom fee tiers or simulations
Retry Delay
- Default: 500 (0.5 seconds)
- Description: Time to wait between retry attempts in milliseconds
- Use case: Set higher for rate-limited APIs, lower for time-sensitive trades
Order Timeout
- Default: 10000 (10 seconds)
- Description: Maximum time to wait for order execution in milliseconds
- Use case: Prevents hanging orders in illiquid markets or during API issues
Leverage
- Default: 10
- Description: Futures leverage multiplier (e.g., 10 for 10x leverage)
- Use case: Sets leverage for futures/margin trading
- Warning: Higher leverage increases both profit potential and risk
Position Cache Time
- Default: 5000 (5 seconds)
- Description: Duration for caching position information in milliseconds
- Use case: Reduces API calls by temporarily caching position data