Stop Order
Places a stop-loss limit order on Binance to automatically sell when the price falls to a specified level, helping protect profits or limit losses.
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.
Inputs
- Client Id - The unique identifier from the Connect node (optional if using direct credentials).
- Currency Pair - The trading pair symbol (e.g.,
BTCUSDT,ETHUSDT,BNBUSDT). - Order Quantity - The amount of the base asset to sell (e.g.,
0.001BTC). - Stop Price - The trigger price that activates the order (e.g.,
48000USDT). - Price - The limit price at which to sell once triggered (e.g.,
47900USDT).
Options
- Api Key - (Optional) Binance API key credential. Use if not providing Client Id.
- Secret Key - (Optional) Binance API secret key credential. Use if not providing Client Id.
Output
- Result - An object containing the stop order creation response with details including order ID and status.
How It Works
The Stop Order node creates a stop-loss limit order that automatically triggers when the market price reaches your stop price.
When executed, the node:
- Retrieves the Binance client (from Client Id or creates one from credentials)
- Validates all required inputs
- Creates a STOP_LOSS_LIMIT order with Time In Force = GTC (Good Till Canceled)
- The order side is automatically set to SELL
- Submits the order to Binance
- Returns the order details including the unique order ID
Order Lifecycle:
- Order is created in status "NEW"
- When market price hits the Stop Price, the order activates
- A limit sell order is placed at the specified Price
- The order fills when market price reaches the limit Price
Requirements
- Either a Client Id from Connect node OR API credentials in options
- Sufficient base asset balance (e.g., BTC) to cover the order
- Valid trading pair that exists on Binance
- Stop Price below current market price (for stop-loss)
- Limit Price typically set below Stop Price
- Appropriate API permissions (spot trading enabled)
Error Handling
The node will return specific errors in the following cases:
- ErrInternal - Failed to retrieve input values
- ErrInvalidArg - Empty or invalid inputs (currency pair, quantity, prices, or credentials)
- ErrCreateStopOrder - Order creation failed (e.g., insufficient balance, invalid prices)
Usage Notes
- Stop orders are primarily used for risk management and protecting profits
- The Stop Price triggers the order activation
- The limit Price determines the actual sell price
- Both prices must be specified
- Orders remain active until triggered, canceled, or expired
- This node creates SELL orders only (stop-loss protection)
- Set limit Price slightly below Stop Price to increase fill probability after trigger
Understanding Stop-Loss Limit Orders
Stop Price (Trigger):
- When market price reaches this level, your order activates
- Should be below current market price for stop-loss
Limit Price (Execution):
- The minimum price you're willing to accept
- Usually set slightly below Stop Price
- Guarantees you won't sell below this price (but order may not fill)
Example:
- Current BTC price: $50,000
- Stop Price: $48,000 (triggers when price drops to $48,000)
- Limit Price: $47,900 (won't sell below $47,900)
Order Response
The result object typically includes:
{
"symbol": "BTCUSDT",
"orderId": 123456792,
"orderListId": -1,
"clientOrderId": "...",
"transactTime": 1640000000000,
"price": "47900.00",
"origQty": "0.001",
"executedQty": "0.000",
"cummulativeQuoteQty": "0.00",
"status": "NEW",
"timeInForce": "GTC",
"type": "STOP_LOSS_LIMIT",
"side": "SELL",
"stopPrice": "48000.00"
}
Example: Protect Profits
Scenario: Protect profits on BTC bought at $45,000, currently at $52,000
Inputs:
- Client Id: (from Connect node)
- Currency Pair:
BTCUSDT - Order Quantity:
0.001 - Stop Price:
48000(trigger if price drops to $48,000) - Price:
47900(sell at $47,900 or better)
Result: If BTC drops to $48,000, a sell limit order is placed at $47,900.
Example: Trailing Stop-Loss Strategy
[Timer: Every 5 minutes]
|
v
[Connect]
|
v
[Get Price: BTCUSDT]
|
v
[If: price > highest_recorded_price]
|
+---> [Update: highest_price = price]
| |
| v
| [Calculate: stop_price = price * 0.95] // 5% below current
| [Calculate: limit_price = stop_price * 0.999]
| |
| v
| [Cancel: previous stop order if exists]
| |
| v
| [Stop Order: new stop at calculated prices]
|
v
[Disconnect]
Example: Risk Management on Entry
[Buy Order: BTCUSDT at 50000]
|
v
[Wait: order filled]
|
v
[Calculate: stop_price = 50000 * 0.95] // 5% stop-loss
[Calculate: limit_price = stop_price * 0.999]
|
v
[Stop Order: protect position]
|
v
[Store: order_id for monitoring]
Setting Stop Prices
Conservative Stop (Tight):
- Stop Price: 2-5% below entry
- Limits losses but may trigger on normal volatility
- Good for: Risk-averse traders, volatile assets
Moderate Stop:
- Stop Price: 5-10% below entry
- Balances protection with volatility tolerance
- Good for: Most traders, medium volatility
Wide Stop:
- Stop Price: 10-20% below entry
- Allows more room for price movement
- Good for: Long-term positions, low volatility
Common Pitfalls
- Stop too tight: Gets triggered by normal price fluctuations
- Stop too wide: Doesn't provide adequate protection
- Limit below stop: Creates gap where order may not fill
- Forgetting to update: Not adjusting stops as price moves up
- Stop clustering: Setting stops at obvious levels where many others have stops
Trading Tips
- Set and Forget: Stop orders protect you even when you're not monitoring
- Trailing Stops: Regularly update stop price as market price increases
- Gap Risk: Set limit price close to stop price to reduce gap risk
- Volatility: Consider average price volatility when setting stop distance
- Support Levels: Avoid setting stops just above major support levels
- Psychology: Stop orders remove emotion from loss-limiting decisions
Stop-Loss vs Stop-Limit
Stop-Loss (Market):
- Guarantees execution once triggered
- May fill at any price (slippage risk)
- Not available in this node
Stop-Loss Limit (This Node):
- Guarantees minimum price via limit
- May not fill if price gaps down
- Better price control
Best Practices
- Always use stop orders to protect positions
- Set stops before entering trades, not after
- Calculate stop prices based on technical analysis, not round numbers
- Update stops as price moves in your favor (trailing stops)
- Never move stops further away from entry (adds risk)
- Use percentage-based stops for consistency
- Test stop strategies with small positions first
- Consider market volatility when setting stop distance
- Monitor stop orders periodically to ensure they're still active
Risk Management
- Position Sizing: Set stop distance first, then calculate position size
- Risk Per Trade: Limit risk to 1-2% of portfolio per trade
- Multiple Stops: Use stop orders on all positions
- Emergency Plans: Have backup plans if stop doesn't fill
- Review Fills: Check stop order executions to improve strategy