Create a BUY order with T/P

Here is an example since I think it is the fastest way to let you all get the point:

BTC price: 50 000$
I want to place a simple order which says: if BTC price goes at 51 000$, buy it with take profit at 55 000$ (and it would be great if it would be possible to set a stop loss at 50 500$)

It’s such a simple order but I’m struggling with it because I cannot find the way to do this!

Thank you ahead!

Hi.
You can create a take profit limit order by specifying type=TAKE_PROFIT_LIMIT when calling POST /api/v3/order ( https://binance-docs.github.io/apidocs/spot/en/#new-order-trade ). Similarly, if you want to place a stop loss order, change the type to STOP_LOSS_LIMIT will work.

Thank you for the answer! However I think it is not going to work.
That’s because if I set a TAKE_PROFIT_LIMIT order with the limit above the current price (51 000$ instead of 50 000$), this will be triggered immediately and not when the price actually reach my target.

I think what I want is not feasible and I have to split it into 2 different orders. Thank you again for the try!

From what you have described, using an OCO order can be achievable.

Sorry I don’t think it can be achieved with one single OCO order. That’s because my goal is to BUY at 51 000$ and to SELL at 55 000$. This cannot be made by one single order and it must be splitter in two different ones: one of BUY and the other of SELL