# This question is disturbing me.... regarding order matching

#### true_promote

##### New Member
I have a doubt which is haunting me since several days. I hope somebody with clear basics can help me out.

This is regarding limit orders and order matching. As I see, limit order is defined online from several sources as "An order to buy or sell stock at a specified price. The order can be executed only at the specified price or better."

I will ask this question with an example
Lets consider the following limit order book

(for simplicity sake assume order quantity is same for all buyers & sellers)

Now here goes my questions. Please try to answer all 3 of them since they all are very closely related and each answer affects the answer to another question

1. How will the order matching happen. Will it be (buyer 1 with seller 2) or (buyer 1 with seller 1)

2. If you say matching will be (buyer 1 with seller 2) then why does a limit order definition says order can be executed at your limit price or better? In what scenario can this execution at better price exactly happen?

3. if you say matching will be (buyer 1 with seller 1) then at what price will the trade be executed- 105 or 103.5. if you are saying 103.5, then wouldn't it eventually imply that any limit sell order practically can never be executed at higher prices even though its definition says so?

Last edited:

#### Riskyman

##### Well-Known Member
I have a doubt which is haunting me since several days. I hope somebody with clear basics can help me out.

This is regarding limit orders and order matching. As I see, limit order is defined online from several sources as "An order to buy or sell stock at a specified price. The order can be executed only at the specified price or better." Limit order means the MAX one is willing to pay but it can be less.

I will ask this question with an example
Lets consider the following limit order book

(for simplicity sake assume order quantity is same for all buyers & sellers)

Now here goes my questions. Please try to answer all 3 of them since they all are very closely related and each answer affects the answer to another question

1. How will the order matching happen. Will it be (buyer 1 with seller 2) or (buyer 1 with seller 1)

2. If you say matching will be (buyer 1 with seller 2) then why does a limit order definition says order can be executed at your limit price or better? In what scenario can this execution at better price exactly happen?

3. if you say matching will be (buyer 1 with seller 1) then at what price will the trade be executed- 105 or 103. if you are saying 103, then wouldn't it eventually imply that any limit sell order practically can never be executed at higher prices even though its definition says so?
You got it right about the limit order. But think you made a mistake with the spread.

This is how it should look like

The bid/ask you quoted is wrong as buyer is willing to pay 105 and seller is at 103. Even supposing this were to be the case then the trade would get executed at 103 i.e at limit order or better.

In the spread i have quoted, the price has to match. Either the seller or the buyer has to blink. Note that its the highest bidder and the lowest seller will be matched.This should answers your questions.

##### Well-Known Member
I have a doubt which is haunting me since several days. I hope somebody with clear basics can help me out.

This is regarding limit orders and order matching. As I see, limit order is defined online from several sources as "An order to buy or sell stock at a specified price. The order can be executed only at the specified price or better."

I will ask this question with an example
Lets consider the following limit order book

(for simplicity sake assume order quantity is same for all buyers & sellers)

Now here goes my questions. Please try to answer all 3 of them since they all are very closely related and each answer affects the answer to another question

1. How will the order matching happen. Will it be (buyer 1 with seller 2) or (buyer 1 with seller 1)

2. If you say matching will be (buyer 1 with seller 2) then why does a limit order definition says order can be executed at your limit price or better? In what scenario can this execution at better price exactly happen?

3. if you say matching will be (buyer 1 with seller 1) then at what price will the trade be executed- 105 or 103. if you are saying 103, then wouldn't it eventually imply that any limit sell order practically can never be executed at higher prices even though its definition says so?
I know I am just posting, but just think of it, is it really helpful by knowing this , you will earn more?

Think of profitability- in each question you ask.

BTW, sorry, do not know the answer though.

Just my one cent, do not want controversies.

#### true_promote

##### New Member

This is how it should look like

The bid/ask you quoted is wrong as buyer is willing to pay 105 and seller is at 103. Even supposing this were to be the case then the trade would get executed at 103 i.e at limit order or better.
I deliberately made-up that order book so that live matching within this example was possible.
And secondly I don't think retail traders order by watching order book precisely. So random chances of buyer-105 and seller-103 is theoretically possible.

2. considering trade occurs at 103 and that buyer is always prioritized, then then wouldn't it eventually imply that any limit sell order practically can never be executed at higher prices even though its definition says so?

Finally thanks for taking the time to reply.

#### true_promote

##### New Member
I know I am just posting, but just think of it, is it really helpful by knowing this , you will earn more?

Think of profitability- in each question you ask.

BTW, sorry, do not know the answer though.

Just my one cent, do not want controversies.
I know what you mean to say, but its just my nature. Unless I understand the basics satisfactorily I always feel under-confident. Also once I get the basics, I am very good in improvising and mastering it. Thats how my brain works ;-)

##### Well-Known Member
:thumb::clapping::clap:
I know what you mean to say, but its just my nature. Unless I understand the basics satisfactorily I always feel under-confident. Also once I get the basics, I am very good in improvising and mastering it. Thats how my brain works ;-)

##### Moderator
Let me see how others answer this question and whether order matching concepts are clear. I will post my views tomorrow.It is easy if the concepts of order matching are clear.

#### equinox

##### Member
1. How will the order matching happen. Will it be (buyer 1 with seller 2) or (buyer 1 with seller 1)
A: first (buyer 1 with seller 1) and then pending quantity (if any) of buyer 1 with seller 2

3. if you say matching will be (buyer 1 with seller 1) then at what price will the trade be executed- 105 or 103. if you are saying 103, then wouldn't it eventually imply that any limit sell order practically can never be executed at higher prices even though its definition says so?

A: depends who putted first 105 or 103, will execute first

#### true_promote

##### New Member
1. How will the order matching happen. Will it be (buyer 1 with seller 2) or (buyer 1 with seller 1)
A: first (buyer 1 with seller 1) and then pending quantity (if any) of buyer 1 with seller 2

3. if you say matching will be (buyer 1 with seller 1) then at what price will the trade be executed- 105 or 103. if you are saying 103, then wouldn't it eventually imply that any limit sell order practically can never be executed at higher prices even though its definition says so?

A: depends who putted first 105 or 103, will execute first
Thanks, and your explanation sounds quite logical. Could you plz point me to some resource where this order matching is explained in detail? I have literally googled for several hours stretch but still couldn't get a meaningful detailed reference on order matching.

#### Somatung

##### Banned
Some links to read in to understand the questions a bit better:

A Crash Course in Commodities: http://www.ftpress.com/articles/article.aspx?p=1436919&seqNum=6