# Why was a buy position not closed at the seller's price?

I'm trying to understand how the trading of crypto-currencies work. I imagine it's not that different from standard currency (or asset) trading, so I ask in this site.

Consider the crypto market shown in Kraken.com. The market can be nicely visualised as a list of sellers and buyers by price level, e.g. here. A capture of a crypto against the Euro: There you see the current market price (exchange rate), given by the value of the last buy-sell match, and then the open bids for sell (red) and buy (green), with order's volumes and the accumulated volume.

So, say that, while the market price is at $$p$$, I open a buy (crypto) position at $$p-\epsilon$$, with $$\epsilon > 0$$, and volume $$X$$.

Then, at some point, someone decides to sell (crypto) a very large volume $$Y$$ ($$Y>>X$$) at $$p - \eta$$, with $$\eta>\epsilon$$ (i.e. at a lower price than mine). From the example below, I imagine the person puts out a sell position "at market price", which I guess is equivalent to instructing the system to "sell at whatever price is needed", i.e. lower the sell price until all my volume is satisfied". So, my order is executed, together with that of several buyers above and below my price, at exactly the same time. For instance, executed orders (visible in the market platform in the link above) looks like this: There you see, for instance, that at 9:46:46, a person sold around 5,000 units of crypto for euros at a price 0.3515. Yet, those who had a buy position at a price above 0.3515 and which was triggered by the sell order above paid more than 0.3515. For instance, the person buying 248.2370 units of crypto paid 0.3545. Shouldn't that person have paid 0.3515?

More crucially, does the nature of the trade depends on the type of order? For instance, Kraken offers several types of order like market, stop loss, take profit, etc. I'm trying to understand how the trades work.