AKUNA CAPITAL Interview Question

Code an orderbook with GTC and FillAndKill order types.

Interview Answer

Anonymous

Sep 1, 2023

The only real gimick here is to check whether the FillAndKill order can match against the orderbook immediately. If it can't kill it, if it can match as much of it as you can then pop it off your queue / list (discard it).