Skip to main content

Sell Order

Places a limit sell order on Binance, allowing you to specify the exact price at which you want to sell a cryptocurrency.

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.
info

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.001 BTC).
  • Order Price - The limit price per unit in the quote asset (e.g., 55000 USDT).

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 order creation response with details including order ID, status, and filled information.

How It Works

The Sell Order node creates a limit sell order that will only execute at your specified price or better.

When executed, the node:

  1. Retrieves the Binance client (from Client Id or creates one from credentials)
  2. Validates all required inputs (currency pair, quantity, and price)
  3. Creates a limit sell order with Time In Force = GTC (Good Till Canceled)
  4. Submits the order to Binance
  5. Returns the order details including the unique order ID

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
  • Order quantity and price that meet Binance's minimum requirements
  • 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, price, or credentials)
  • ErrCreateSellOrder - Order creation failed (e.g., insufficient balance, invalid pair, minimum size not met)

Usage Notes

  • Limit orders only execute at the specified price or better (higher for sells)
  • Orders remain open until filled, canceled, or expired
  • The order uses GTC (Good Till Canceled) time in force - it stays active until filled or manually canceled
  • You must own the base asset to place a sell order
  • Minimum order sizes vary by trading pair - check Binance trading rules
  • The result includes the order ID which can be used to track or cancel the order

Order Response

The result object typically includes:

{
"symbol": "BTCUSDT",
"orderId": 123456790,
"orderListId": -1,
"clientOrderId": "...",
"transactTime": 1640000000000,
"price": "55000.00",
"origQty": "0.001",
"executedQty": "0.000",
"cummulativeQuoteQty": "0.00",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "SELL"
}

Example: Sell Bitcoin at Target Price

Scenario: Sell 0.001 BTC when price reaches $55,000 USDT

Inputs:

  • Client Id: (from Connect node)
  • Currency Pair: BTCUSDT
  • Order Quantity: 0.001
  • Order Price: 55000

Output: The result contains the order ID and status. Save the order ID to track or cancel the order later.

Example: Take Profit Strategy

[Connect]
|
v
[Get Balance: BTC]
|
v
[Get Price: BTCUSDT]
|
v
[Calculate: target_price = current_price * 1.10] // 10% profit
|
v
[Sell Order: price = target_price]
|
v
[Store Order ID]
|
v
[Disconnect]

Example: Trailing Stop with Sell Orders

[Timer Trigger: Every 5 minutes]
|
v
[Connect]
|
v
[Get Price: BTCUSDT]
|
v
[If: price > highest_price]
|
+---> [Update: highest_price = price]
| |
| v
| [Calculate: stop_price = price * 0.95] // 5% trailing stop
| |
| v
| [Cancel Previous Order]
| |
| v
| [Sell Order: price = stop_price]
|
v
[Disconnect]

Trading Tips

  • Limit vs Market: Use limit orders when you want price control; use market orders for immediate execution
  • Price Setting: Set your sell price at or above current market price
  • Take Profit: Automatically sell when your profit target is reached
  • Partial Fills: Large orders may fill partially; check executedQty in the response
  • Order Book: Use List Orders node to see current bid/ask spread before placing orders

Common Errors

  • Insufficient balance - Not enough base asset (e.g., BTC) to sell
  • Invalid symbol - Trading pair doesn't exist or is delisted
  • LOT_SIZE violation - Quantity doesn't meet minimum/maximum/step size requirements
  • PRICE_FILTER violation - Price doesn't meet minimum/maximum/tick size requirements
  • MIN_NOTIONAL violation - Order value (quantity × price) is below minimum

Best Practices

  • Always validate sufficient balance before placing orders
  • Use Get Price to check current market price before setting your limit price
  • Store the order ID from the result for tracking purposes
  • Implement error handling for common trading errors
  • Consider using Continue On Error to handle order rejections gracefully
  • Monitor order status using Get Order node with the returned order ID
  • Set sell prices realistically based on market conditions
  • Don't set sell price too high or the order may never fill

Risk Management

  • Never sell more than you own
  • Consider setting stop-loss orders to limit downside risk
  • Use Get Balance to verify holdings before placing large sell orders
  • Monitor your open orders regularly
  • Cancel and replace orders if market conditions change significantly