Find out if an order is canceled

I am trying to do the following
(fok is fill or kill, either fills or cancles the order)

create_order{spy, 100, limit, fok, x)
if canceled
skip the next part of the code

how do you check if the order submitted just then was canceled?