3 ms·
You look at the public order books. So, for example, the order book for a particular exchange's BTCUSD market might contain the following buy orders (from vario
by runeks 9y ago
You look at the public order books. So, for example, the order book for a particular exchange's BTCUSD market might contain the following buy orders (from various people who've deposited USD and wish to buy BTC):
BUY 10 BTC @ 15,000 USD
BUY 10 BTC @ 14,900 USD
BUY 50 BTC @ 14,800 USD
If you sell 67.5 BTC into this market, you will sell the first 10 BTC for 15,000 USD each, the next 10 BTC for 14,900 USD each, and the remaining 47.5 BTC for 14,800 each, netting you a total of 150,000+149,000+703,000=1,002,000 USD. The average price would then be 1,002,000/67.5=14,844.4444, which means you would incur a slippage of (15,000-14,844.4444)/15,000=0.0103703733=~1% (which is the difference between your average selling price (14,844.4444) and the price of the first buy order that your sell order matched against (15,000)).