Stop Loss Order: How to identify if a stop loss order has been executed / filled via the api?

Hi,

If there a way to identify if a stop loss (market or limit) order has been executed in the futures api?

I have been searching in trades or orders via the python sdk, for example,

trades = request_client.get_account_trades(symbol)
orders = request_client.get_all_orders(symbol)

and no luck so far.

Any tip?

Thanks!

Hey I have the same question for the margin, I want to place a STOP_LOSS_LIMIT order since it is the one that most cryptos generally accept but I have the same question of how to know when it is executed without having to monitor the price and check the status of the STOP_LOSS_LIMIT order, besides that I suppose that once the order is executed the system immediately creates the LIMIT order but I suppose that it assigns a different orderId and clientorderId

1 Like

we have the websocket user data stream which will push the order status as soon as it’s filled.
If you prefer to check the status via restful API, then the GET /fapi/v1/order is the endpoint that returns the latest status.

1 Like

Hi, many thanks for the tip!

So basically I had to query “/fapi/v1/openOrders” to obtain the orderId and clientOrderId for all open orders. The from this group, filter by origType to get the stop loss order.

Using orderId and clientOrderId I can call “/fapi/v1/order” to get the status.

Thanks also for the websockets tip. I just saw in the documentation “Event: Order Update”. I havent implemented it, but will give it a try.

Thanks!

1 Like

walk if you really want to have $1,000 right now you can ever to join me on this come off you going to see something schererville right now text me a message or my email