How to check Futures if order is active?

Hi everyone,

When I call futuresAllOrders() I get the response below.

{ orderId: xxxxxx, symbol: 'BTCUSDT', status: 'FILLED', clientOrderId: 'xxxxxxxx', price: '0', avgPrice: '33929.10000', origQty: '0.005', executedQty: '0.005', cumQuote: '169.64550', timeInForce: 'GTC', type: 'MARKET', reduceOnly: false, closePosition: false, side: 'SELL', positionSide: 'BOTH', stopPrice: '0', workingType: 'CONTRACT_PRICE', priceProtect: false, origType: 'MARKET', time: 1625566561956, updateTime: 1625566561956 }

My question is, how do I know if an order is still active or closed ? Do I need to user another API end point?

Query Current All Open Orders:

Orders not in the above response, has been filled, canceled or expired.

Hi thanks for your time, I think my communication has been bad.
Let me provide some context.

  • Say, I have gone long via a market order for 2 hours.
  • Now, suppose I close my position to realize PnL
  • Using the order ID, how do I check if the order is closed or still open?

Below is the response from the link you gave me;
What information is in it that I can use to answer my question?

I am using the JavaScript feature of futuresAllOrders

Does it have to do with the value of status? if so, what should the value be?

    [
  {
    "avgPrice": "0.00000",
    "clientOrderId": "abc",
    "cumQuote": "0",
    "executedQty": "0",
    "orderId": 1917641,
    "origQty": "0.40",
    "origType": "TRAILING_STOP_MARKET",
    "price": "0",
    "reduceOnly": false,
    "side": "BUY",
    "positionSide": "SHORT",
    "status": "NEW",
    "stopPrice": "9300",                // please ignore when order type is TRAILING_STOP_MARKET
    "closePosition": false,   // if Close-All
    "symbol": "BTCUSDT",
    "time": 1579276756075,              // order time
    "timeInForce": "GTC",
    "type": "TRAILING_STOP_MARKET",
    "activatePrice": "9020",            // activation price, only return with TRAILING_STOP_MARKET order
    "priceRate": "0.3",                 // callback rate, only return with TRAILING_STOP_MARKET order
    "updateTime": 1579276756075,        // update time
    "workingType": "CONTRACT_PRICE",
    "priceProtect": false            // if conditional order trigger is protected   
  }
]