How to set a take profit and a stop loss for futures market order?

How to set a take profit and a stop loss for futures market order?
how should param be configurated to set them?
I’m using the following function:
params= {
‘quoteOrderQty’: quantity,
}
exchange.create_order(symbol, ‘market’, ‘buy’, quantity, price,params)

Hi, were you able to make it work?

Please find how the create_order is defined. You will need to provide stopPrice and price for this order type, for more details please check:

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

anyone else find dino’s answer useless? maybe correct but not helpful.

Could someone please share how to set take profit on a market order via api?

3 Likes

Read this - https://binance-docs.github.io/apidocs/futures/en/#new-order-trade like dino said and try it out. If you encounter any problem, share your request details and the problem or error msg. This forum is for helping people, not Binance API 101

Yes I’m having the same problem. you can not specify both take profit and stop loss at the same time. The only way is to create a 2nd order as a limit order… so every time you want to trade you have to send 2 orders for example buy market order and sell limit order. you may want to check out oco order type.

Regards

2 Likes

Take profit order is different then the regular limit order & set TP value after the order executed.

Here I explained the detail of our approach: https://github.com/jaggedsoft/node-binance-api/issues/614

I’m not sure that OcO order type is solution for us but if it helps please let us know