This isn't the native API is it?
Why are order parameters (tif, hidden, rth) with the contract object? Makes no sense.
I send MIDPRICE orders with action, tif, orderType and totalQuantity fields regularly without issues.
Ehy D08 guess what? It seems the problem was caused by the use of SMART in the order parameter!! Thank You to have taken the time to write down the order parameter that You are using!!