Back
Challenge 4 - Single Fill Calculation
EasyOrderbookFills4 / 12

Challenge 4: Single Fill Calculation

Before matching a full book, handle one maker order.

Task

Implement fill_once.

Rule

The filled quantity is the smaller of taker quantity and maker quantity.

Return:

(filled_qty, taker_remaining, maker_remaining)

For taker 7 and maker 5, fill 5, leaving taker 2 and maker 0.

LanguageRust
Loading editor...
Run works without login. Submit requires sign-in so completion can be saved.
Run cases to compare your output against each configured input. Submit saves progress only when every case passes.
    Challenge 4 - Single Fill Calculation · ORDERBOOK Exercise | learn.sol