How can I know if my order has reached Stop Loss

Hi,

I’m trying to get the order status and I want to know if my order reached take profit or reached stop loss
for example:

I want to use this code:

takeprofit-status

and I want to get the status of this order and I want to know if its reached TAKE_PROFIT.

Dose “avgPrice” that’s I get it from the “binance.futuresOrderStatus()” can tell me that ?, so if its bigger than 0 its means that I’ve reached the Take profit?

If you query this endpoint, if the realizedPnl value of the order is > 0 then that indicates it’s reached your TP since it made a profit (or you manually closed the position in profit). If you query the /fapi/v1/openOrder endpoint and the order has been filled/cancelled, you’ll be shown an error message stating “Order does not exist”

Thanks a lot for your answer