Fill or kill orders several issues
mzaja opened this issue · 3 comments
mzaja commented
Noticed a couple of issues with FoK orders:
-
When a FoK order is placed and cancelled unmatched (statusEXPIRED
).size_remaining
attribute remains equal to the requested size whilesize_cancelled
is zero. These values should be swapped. -
Order status is updated toEXECUTION_COMPLETE
when it should be updated toEXPIRED
. - Simulation sets the cancelled amount under
size_lapsed
, when it should besize_cancelled
. - #706 (comment)
mzaja commented
After additional testing, I've come to the conclusion that tasks 1 and 2 are not necessary for implementation. In most cases the order stream update comes very shortly after the FoK order is placed and sets the status to EXECUTION_COMPLETE
and the correct value for size_cancelled
. It would be a lot of hassle and potential pitfalls to implement immediate processing of order placement reports in case they arrive before the order stream update.
mzaja commented
Closing because the tasks have been completed and PR merged.