danielkorzekwa/betting-exchange — Issue #3: Bets matching ordering rules
Author: danielkorzekwa
Created: 2012-02-07 08:12:08+00:00
State: open

As a trader
I want to place bets and get them matched in order they have been placed
So that I can know which order bets are matched

As proven by:
All tests for acceptance criteria pass.

Acceptance criteria:
The stake money that you see available in the market view at each odds increment can be a combination of one or more different users' unmatched bets. When you match a bet you will always be matched with the first bet that was placed at those particular odds i.e. first come first served. There is therefore an incentive for users to offer odds early or to offer better odds than those currently available.

You can bet all or part of the total stake amount shown. If the required stake is not available at the best odds, you can adjust your odds to the second- or third-best and place the full stake amount. The system will automatically match the stake available at the best odds first and then the stake at the 2nd best odds and so on down to the minimum odds acceptable to you.