Skip to content

Instantly share code, notes, and snippets.

@prystupa
Last active December 10, 2015 01:58
Show Gist options
  • Save prystupa/4363459 to your computer and use it in GitHub Desktop.
Save prystupa/4363459 to your computer and use it in GitHub Desktop.
Additional two tests for buy orders, to test price priority rule
Scenario: Add two limit orders to the BUY order book, with more aggressive order first
When the following orders are added to the "Buy" book:
| Broker | Qty | Price |
| A | 100 | 10.5 |
| B | 100 | 10.4 |
Then the "Buy" order book looks like:
| Broker | Qty | Price |
| A | 100 | 10.5 |
| B | 100 | 10.4 |
Scenario: Add two limit orders to the BUY order book, with less aggressive order first
When the following orders are added to the "Buy" book:
| Broker | Qty | Price |
| B | 100 | 10.4 |
| A | 100 | 10.5 |
Then the "Buy" order book looks like:
| Broker | Qty | Price |
| A | 100 | 10.5 |
| B | 100 | 10.4 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment