betcode-org/flumine

Fill or kill orders several issues

Closed this issue · 3 comments

Noticed a couple of issues with FoK orders:

  • When a FoK order is placed and cancelled unmatched (status EXPIRED). size_remaining attribute remains equal to the requested size while size_cancelled is zero. These values should be swapped.
  • Order status is updated to EXECUTION_COMPLETE when it should be updated to EXPIRED.
  • Simulation sets the cancelled amount under size_lapsed, when it should be size_cancelled.
  • #706 (comment)

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.

PR opened: #735.

Closing because the tasks have been completed and PR merged.