how to place a new limit order that return and auto-cancel immediately whether filled,partial filled,or not filled

if there a way to make new limit order that return and auto-cancel immediately whether the order status are.
e.g. I make a new limit order to buy BTCUSDT at price 50000 of 10

  1. the order is filled, just return.
  2. the order is PARTIALLY_FILLED of 3, then return 3 with the order cancelled.
  3. the order is not matched at all. then return 0 with the order cancelled.

timeInForce=IOC