Binance: OCO Order

How the Limit Sell order works on Binance - OCO Order

Sell all your Coins:

Just set the takeProfit and the StopLossTrigger according to your needs. t

  • takeProfit: the price when you want to sell with a profit

  • stopLossTrigger: the price when you want the stop loss to sell your coins to avoid a big loss

  • stopLossLimit: the actual price of the stopLoss

You want all your coins to be sold when the stop Loss is hit?

If you dont understand the OCO Order on Binance you can just set the stopLossLimit to 0 and the Bot will calculate the stopLossLimit automatically.

set the "stopLossLimit" : 0

The Bot will calculate the stopLossLimit = stopLossTrigger * 0.7 this should be low enough to sell all your coins immediately. The Exchange will try to fill your order at the best Price possible.

Binance: Limit Sell Order - OCO Order

The Binance Bots will place an OCO, or โ€œOne Cancels the Otherโ€ order. This allows you to place two orders at the same time. It combines a limit order, with a stop-limit order, but only one of the two can be executed. See the exact explanation below

The settings in the bots are the same as on the Website:

So: takeProfit is the LIMIT Price from the above Picture. The Stop-Limit has the Stop and the Limit which are the stopLossTrigger and the stopLossLimit in the Bot.

{
...
    "createOCOOrder" : "True",
    "takeProfit": 1.15,
    "stopLossTrigger": 0.90,
    "stopLossLimit": 0,
...
}

Calculation of the Prices:

This is the intern calculation of the prices for the OCO Order:

  • LimitPrice for selling: buyPrice * takeProfit

  • Stop-Limit Stop, when the StopLoss is triggered: buyPrice * stopLossTrigger

  • Stop-Limit Limit, where the Limit Sell Order is placed: buyPrice * stopLossLimit

If you put 0 for the stopLossLimit:

  • LimitPrice for selling: buyPrice * takeProfit

  • Stop-Limit Stop, when the StopLoss is triggered: buyPrice * stopLossTrigger

  • Stop-Limit Limit, where the Limit Sell Order is placed: buyPrice * (stopLossTrigger * 0.7)

The stopLossLimit is the price up to where your coins are sold. If this stopLossLimitPrice is higher and the current price falls below it, your coins will remain in the orderbook and will not be sold. If you don't know what value you should set the stopLossLimit to, then just take 0. The bot will then do this for you automatically to ensure you sell everything. And dont worry the Exchange will fill your order at the highest price possible.

The StopLossTrigger is the Price of your Stop Loss. And to sell your coins the stopLossLimit needs to be below that value. The stopLossLimit is the price

The StopLossTrigger is the price of your StopLoss. When the current price reaches this stopLossTrigger the order gets triggered at the stopLossLimit Price. For the Order to be sold immediately the stopLossLimit has to be lower than the stopLossTrigger. When both settings are almost or are equal you could end up with coins in the orderbook which werent sold!

stopLossTrigger > stopLossLimit

Last updated