Skip to content

Instantly share code, notes, and snippets.

@prystupa
Created December 25, 2012 21:43
Show Gist options
  • Save prystupa/4375582 to your computer and use it in GitHub Desktop.
Save prystupa/4375582 to your computer and use it in GitHub Desktop.
Price and time priority for market orders
Feature: Core Market Order Functionality for Price and Time Priority
Scenario Outline: Price and time priority of market orders over limit orders
When the following orders are added to the "<Side>" book:
| Broker | Qty | Price |
| A | 100 | 10.5 |
Then the "<Side>" order book looks like:
| Broker | Qty | Price |
| A | 100 | 10.5 |
When the following orders are added to the "<Side>" book:
| Broker | Qty | Price |
| B | 100 | MO |
Then the "<Side>" order book looks like:
| Broker | Qty | Price |
| B | 100 | MO |
| A | 100 | 10.5 |
When the following orders are added to the "<Side>" book:
| Broker | Qty | Price |
| C | 100 | 10.5 |
Then the "<Side>" order book looks like:
| Broker | Qty | Price |
| B | 100 | MO |
| A | 100 | 10.5 |
| C | 100 | 10.5 |
When the following orders are added to the "<Side>" book:
| Broker | Qty | Price |
| D | 100 | MO |
Then the "<Side>" order book looks like:
| Broker | Qty | Price |
| B | 100 | MO |
| D | 100 | MO |
| A | 100 | 10.5 |
| C | 100 | 10.5 |
Examples:
| Side |
| Buy |
| Sell |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment