Skip to content

Instantly share code, notes, and snippets.

@prystupa
Created January 12, 2013 16:47
Show Gist options
  • Save prystupa/4519167 to your computer and use it in GitHub Desktop.
Save prystupa/4519167 to your computer and use it in GitHub Desktop.
Feature: Core Pegged Order Functionality
Scenario Outline: Adding pegged order to a book with no best limit to peg
If a book is empty than no best limit is available to peg, so we expect the order to be rejected
If a book only has market orders then best limit is also undefined, so we also expect the order to be rejected
Given the "<Side>" order book looks like:
| Broker | Qty | Price |
When the following orders are added to the "<Side>" book:
| Broker | Qty | Price |
| A | 100 | Peg |
Then the following "<Side>" orders are rejected:
| Broker | Qty | Price |
| A | 100 | Peg |
And the "<Side>" order book looks like:
| Broker | Qty | Price |
When the following orders are added to the "<Side>" book:
| Broker | Qty | Price |
| B | 100 | MO |
| C | 100 | Peg |
Then the following "<Side>" orders are rejected:
| Broker | Qty | Price |
| C | 100 | Peg |
And the "<Side>" order book looks like:
| Broker | Qty | Price |
| B | 100 | MO |
Examples:
| Side |
| Buy |
| Sell |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment