I am building a service similar to the BullionVault where users can buy and sell bullion. They will be placing their Buy and Sell orders on the service. Matched orders will get executed.
My question is this:
When there is a matching buy and sell order, where, the selling price is significantly lower than the buy orders buying price, how should the price be determined?
These are the Options I could think of :
- Either the buyers price is taken or the sellers price is taken and one of them gets the benefit.
- The difference between prices is split in half and both of them benefit.
- The exchange buys from the seller and sells to the buyer in real time, so the difference is picked up by the exchange.
As this is similar to how the stock markets work, I am trying to understand how this type of a trade is executed in those exchanges.