I'm placing a Limit order for 1ETH and if 0.99999 gets filled it then can handle the 0.00001 remaining until I change the Limit price and it views it as a new order and less than $10 so it rejects it.

What would the code be to tell my algo that if 99% of the original total is filled, that's good enough and it can then place the Sell order?