Last active
November 26, 2017 03:49
-
-
Save prystupa/4415983 to your computer and use it in GitHub Desktop.
Matching using a reference price
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Matching using a reference price | |
Scenario: Matching incoming Buy market order against Sell market order when no best limit price is available | |
Given the reference price is set to "10" | |
Given the following orders are submitted in this order: | |
| Broker | Side | Qty | Price | | |
| A | Sell | 100 | MO | | |
| B | Buy | 100 | MO | | |
Then the following trades are generated: | |
| Buying broker | Selling broker | Qty | Price | | |
| B | A | 100 | 10 | | |
And market order book looks like: | |
| Broker | Qty | Price | Price | Qty | Broker | | |
Scenario: Matching incoming Sell market order against Sell market order when no best limit price is available | |
Given the reference price is set to "10" | |
Given the following orders are submitted in this order: | |
| Broker | Side | Qty | Price | | |
| A | Buy | 100 | MO | | |
| B | Sell | 100 | MO | | |
Then the following trades are generated: | |
| Buying broker | Selling broker | Qty | Price | | |
| A | B | 100 | 10 | | |
And market order book looks like: | |
| Broker | Qty | Price | Price | Qty | Broker | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment