Let’s go back to your buy order of 10 BTC and imagine that it was broken down to ten 1 BTC orders.
On some exchanges, traders have the ability to place a maximum price they’re willing to pay. This is something the exchange uses if the price changes very quickly and the market order fails. So, if BTC’s market price is 9,000 a trader would indicate the maximum price as 9,050 or 9,100. Let’s get to the fun part now.
As you remember, your trade was broken down into ten 1 BTC orders and you indicated your maximum price as 9,100. Let’s now imagine that the first BTC was processed easily and was given to you for 9000 because it’s the market price.
Once that 1 BTC is processed, the HFT server will notice the trade being made immediately. We’re talking nanoseconds here because of the co-location to the exchange’s server. It immediately identifies you as a big trader as it’s programmed to think that a large trade is just a part of an even larger one.
Therefore, it will start trying to identify your maximum price. It has seen that you bought 1 BTC for 9000, so it will try something like 9500 but will fail. After failure, it will try 9400, 9300 and all the way down to 9100.
Once it guesses that you’re willing to pay 9100, it buys up all of the 9000 priced BTC on the exchange’s server because it has faster access and then sells you all of them for $9100 a piece. This way, the HFT user gains a profit of around 800-900 in a millisecond, while you have to pay more for the remainder of your BTC order.
Is that how it really works? if yes, how do they identify the maximum price someone is willing to pay?