0

So I have placed a MARKET BUY order, what I need to do next is place a Stop Loss order for this. I have come across this code, but this states "STOP_MARKET" so I'm confused. Shouldn't there be a limit stop loss order?

This is my Market Buy Order:

BUY_ORDER = client.futures_create_order(
                symbol=SYMBOL,
                type='MARKET',
                side='BUY',
                quantity=QUANTITY
            )

This is what I came across:

client.futures_create_order(symbol=BTCBUSD, side='SELL', type='STOP_MARKET', stopPrice=46660, closePosition='true')

What's the correct answer? Thanks.

Cassano
  • 253
  • 5
  • 36

1 Answers1

0

Binance documentation reference: https://binance-docs.github.io/apidocs/futures/en/#new-order-trade

Short answer: Apparently STOP_LIMIT is not applicable/allowed in binance futures with closePosition='true'

You clearly are looking to place a "STOP_LIMIT" order, which the exchange binance does not seem to provide for futures New Order (TRADE) endpoint. In the entire section for New Order (TRADE), they only have mentioned STOP_MARKET.

The above code you have mentioned is valid and it should place a "stop_loss" to the entire position that will be executed as a market order.

Also check out Python Binance Futures - problem creating Take Profit Limit order -> (APIError(code=-2021): Order would immediately trigger.) It's about 'TAKE_PROFIT_MARKET' but uses very similar code as STOP_MARKET.

Pranav Joshi
  • 117
  • 1
  • 5