How is it decided which orders get matched first? In the following example, which limit sell gets matched with m1 and filled at 42.15? a1, a2, a3, or a4?
Thx, Keith :^)
Example: the order book for XYZ stands as follows, where bn stands for an active limit buy order (bid), and an (ask) is a limit sell, all for 100 shares. As you can see, bid and ask now stand at 42.14/42.15:
Now, market buy order m1, also for 100 shares, is sent to the exchange. With which sell limit is it matched: a1, a2, a3, or a4?
For completeness of the example, let's assume that it's a FIFO (you know what they say when you assume!), and a1 gets matched. The book would then look like this :
Thx, Keith :^)
Example: the order book for XYZ stands as follows, where bn stands for an active limit buy order (bid), and an (ask) is a limit sell, all for 100 shares. As you can see, bid and ask now stand at 42.14/42.15:
Code:
42.17 a1 a2 a3
42.16 a1 a2
42.15 a1 a2 a3 a4
b1 b2 b3 42.14
b1 b2 b3 b4 b5 42.13
b1 42.12
Now, market buy order m1, also for 100 shares, is sent to the exchange. With which sell limit is it matched: a1, a2, a3, or a4?
Code:
42.17 a1 a2 a3
42.16 a1 a2
m1 42.15 a1 a2 a3 a4 <- HERE. Who gets matched?
b1 b2 b3 42.14
b1 b2 b3 b4 b5 42.13
b1 42.12
For completeness of the example, let's assume that it's a FIFO (you know what they say when you assume!), and a1 gets matched. The book would then look like this :
Code:
42.17 a1 a2 a3
42.16 a1 a2
42.15 a2 a3 a4
b1 b2 b3 42.14
b1 b2 b3 b4 b5 42.13
b1 42.12
Last edited: