Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: btcmania on March 03, 2014, 03:20:01 AM



Title: How do exchanges work (pricing/orders)
Post by: btcmania on March 03, 2014, 03:20:01 AM
Hi.

1) I've always wondered... when you're on BTC-E and the market changes, often you'll hear people talk about Okcoin or Huobi dropping price or dumping coins and sure enough the market on BTC-E changes in accordance. Are the exchanges interlinked for pricing? Do they poll one another or are prices set unique to the exchange? I find the prices are mostly within a few dollars of one another so it's got to be more than just a coincidence.

2) When you place an order, say to buy BTC, if your order price is at $500 and BTC is currently at $550 will this bring the price down or do all of the orders as a whole raise the price (orders=demand). In other words, are prices determined by the number of buy and sell orders alone or does it also matter the prices of the orders? If people decide to put in buy orders for BTC at $50 below current cost, does this work against people by creating demand?

3) When people speak of buy walls being broken and no buy support, if you look on BTC-E (I'm using them for my example) it could say : Total: 4080320.83 USD

so with 4 million dollars in buy orders there IS buy support. What do people look at to determine there is no buy or sell support if the tables are always full of orders waiting to be matched.

4) If the price on LTC is $13.40 and the buy orders are $13.00 and the sell orders are $13.60 what occurs to make the sales? In other words if these are hard placed bids (not robots) and not going to change automatically, are they in deadlock or does the exchange do something to force the mismatched buy/sells to reach a consensus?

When watching the buys/sells I notice that the prices are always changing, they go up and down which means either robots remove and replace orders constantly or the exchange tries to match them.... please explain how they are matched.

Thanks for clearing things up :)


Title: Re: How do exchanges work (pricing/orders)
Post by: Foxpup on March 03, 2014, 04:04:36 AM
1) I've always wondered... when you're on BTC-E and the market changes, often you'll hear people talk about Okcoin or Huobi dropping price or dumping coins and sure enough the market on BTC-E changes in accordance. Are the exchanges interlinked for pricing? Do they poll one another or are prices set unique to the exchange? I find the prices are mostly within a few dollars of one another so it's got to be more than just a coincidence.
Each exchange has its own unique orderbook, and prices are not directly linked. However, prices are indirectly linked through arbitrage: if coins are being offered for a lower prices on one particular exchange, traders will buy those coins, driving the price up on that exchange, and sell those coins on exchanges where a high price is offered, driving the price down on those exchanges, until an equilibrium is reached. Small price differences still exist due to fees and delays making arbitrage impractical or impossible beyond a certain point.

2) When you place an order, say to buy BTC, if your order price is at $500 and BTC is currently at $550 will this bring the price down or do all of the orders as a whole raise the price (orders=demand). In other words, are prices determined by the number of buy and sell orders alone or does it also matter the prices of the orders? If people decide to put in buy orders for BTC at $50 below current cost, does this work against people by creating demand?
There is no such thing as a "current" price, only the "last" price. Prices only exist where a trade has taken place, and therefore only exist in the past. If you place a buy order at $500, one of two things will happen: either someone else has already placed a sell order at or below $500, in which case the trade takes place at the seller's asking price (which may be higher or lower than the last price); or there is currently no such sell order, and your buy order will not be filled until someone places a sell order for that price (at which point you buy their coins for $500, regardless of their asking price: whichever order was placed first is the price that is used).

Note that since a buy order is filled by the lowest sell order (the "best ask"), the remaining sell orders are at higher prices, so the next buyer will have to pay a higher price unless a new sell order is made at a lower price.

3) When people speak of buy walls being broken and no buy support, if you look on BTC-E (I'm using them for my example) it could say : Total: 4080320.83 USD

so with 4 million dollars in buy orders there IS buy support. What do people look at to determine there is no buy or sell support if the tables are always full of orders waiting to be matched.
Saying there is or isn't support or resistance is meaningless without specifying a price level. There's always support and resistance; the question is at what price. If there's a huge volume of buy orders below $500, but very little volume above $500, then there's support at $500. If, on the other hand, most of the buy orders are below $450, with very little above that, then there's no support at $500, the support is at $450.

Note that orders can be placed and cancelled on a whim, so apparent support may disappear without warning, or new support may suddenly appear out of nowhere when a price level is "tested". The orderbook does not paint a complete picture.

4) If the price on LTC is $13.40 and the buy orders are $13.00 and the sell orders are $13.60 what occurs to make the sales? In other words if these are hard placed bids (not robots) and not going to change automatically, are they in deadlock or does the exchange do something to force the mismatched buy/sells to reach a consensus?
There's a deadlock. No trade will take place until buyers raise their prices or sellers drop theirs. Actually, this is the normal state an exchange will be in: if buy and sell orders match, the trade should have already taken place, and the orders are filled and no longer exist. If such orders continue to exist for more than a fraction of a second, the trading engine is broken.

When watching the buys/sells I notice that the prices are always changing, they go up and down which means either robots remove and replace orders constantly or the exchange tries to match them.... please explain how they are matched.
What makes you think it's robots? Humans can remove and replace orders too, you know. Remember that an exchange may have dozens, hundreds, or even thousands of users online at any given time, all constantly placing, cancelling, and changing orders. The exchange itself never changes or sets prices.


Title: Re: How do exchanges work (pricing/orders)
Post by: btcmania on March 03, 2014, 04:45:09 AM
Thanks for the information!


Title: Re: How do exchanges work (pricing/orders)
Post by: Abdussamad on March 03, 2014, 05:55:07 AM
Wow impressive answer Foxpup. Thanks.