<p>you're providing alpha to "high frequency market makers". Since they can tell that you are not a bot, they are assuming its a real bid, so they can bid on top of you and then they are now in a risk free position. </p>

<p>if they get hit, they will immediately place an ask at a price of:  last + (last-bid). they will wait hoping you will pay up, they may even entice you by placing another bid higher... then (within a couple of seconds) they will hit your bid, and take the small loss. </p>

<p>as long as the spread is much wider than the tic above you, they are in positive alpha. </p>

<p>in general, you should not try to play this game. just place "marketable" limit orders.. so buys at the best ask, and sells at the best bid, otherwise you are giving away your hand.</p>

CC BY-SA 4.0
2018-08-10T19:28:16.950Z
Thanks, that makes good sense. Although I was more curious about what´s going on than actually trying to "play this game", why wouldn´t I? If I can do what they do, buying low getting myself in among the bids and selling high doing the same on the asks, there should be a good chance that I´ll suceed making a bit myself as well, right?
Corey Hart
CC BY-SA 4.0
2018-08-11T22:47:16.833Z
no. you would be competing with the most advanced high-frequency market making algos. it has been impossible to compete with these since 2007 - i used to code them for hedge funds
jaybny
CC BY-SA 4.0
2018-08-16T04:36:46.863Z
Ok, so you´re saying that the algos on cryptoexchanges (which did not exist in 2007) are the same as those on standard exchanges fro futures, forex etc? 
Did anything special happen in 2007, some sort of algo revolution?
Corey Hart
CC BY-SA 4.0
2018-08-16T05:35:25.220Z
yes. pretty much the same. eventually all the alpha gets arbitraged out  - high-frequency "stat arb" - just stopped working around that time.
jaybny
CC BY-SA 4.0
2018-08-09T06:35:18.537Z
2018-08-09T06:35:18.537Z
jaybny
<p>I'm having a tough time understanding you, but if I try to extrapolate what you're saying, I think it's other traders who are out-bidding you, not the exchange itself. With so many bots out there, I think many people use them to trade, which could cause extra activity in a market that was otherwise dormant for a while. I use ClueDex TrendSockets to see real-time market data and often there will be dormant markets that suddenly get interest and begin trading. If no trading occurs on a market it means that there is no consensus on the price. Every one of those orders in the Order Book are real orders, but if the price never matches, there is no market and nothing is exchanged. The exchange algorithm only tries to find price matches. When you place a sell order, you are putting the price that is the lowest you are willing to sell that coin for. When you place a buy order, you are putting the highest price that you are willing to pay for that coin. </p>

CC BY-SA 4.0
2018-06-28T11:12:19.770Z
Thanks, I know the mechanics of an exchange when it comes to bids and asks. You may be right of course that it´s the bots of other clients that are doing what I see. But as far as I know, such bots base themselfes on wellknown trading strategies and this is where I don´t see the described actions fitting in.
Corey Hart
CC BY-SA 4.0
2018-06-28T11:20:00.813Z
Let´s say I put a bid order that converts into 0.0007 BTC at price 0.00003432. Untill then, the highest bid was 0.00003430.
Now the previous highest bidder moves up til 0.00003433. Why would a private bot do this?
Corey Hart
CC BY-SA 4.0
2018-06-28T11:20:10.013Z
I do understand that there may be some sort of "buy as low as possible, but make sure that you buy, but not as high as the lowest sell order" strategy in place but to me it seems more likely that it´s the exchange trying to drive the price that I am willing to buy for up. Exchanges also hold coins - it´s not only the clients that do so. 
And well, these are the algos I´m curious about how works in detail - whether if deriving from private bots, or bots owned by exchanges.
Corey Hart
CC BY-SA 4.0
2018-06-29T13:54:20.760Z
I believe it would be unethical for an exchange to do this so I am giving the exchange the benefit of the doubt. You're right in that this behavior is to drive the price up. It's called "spoofing" where a trader will place multiple orders at higher prices without an intention on ever having them filled--they are withdrawn before they can be filled. The increase in activity can drive more people to trade, which ultimately stimulates the market and causes a price fluctuation. There's also something called a "wall" where someone puts a large volume of shares up at a higher price than others.
Laser-Lance
CC BY-SA 4.0
2018-06-29T13:56:44.137Z
This is one reason to never trust the order book if writing a trading bot of one's own. Nothing matters in the market until the order is filled, but I still see people writing bots that use data other than the highest bid, lowest ask, and last price, to make a trading decision. That's very dangerous.
Laser-Lance
CC BY-SA 4.0
2018-07-03T23:47:11.840Z
I don´t know if exchanges are ethical, but you´re saying that somebody may already hold this asset and then try and trick me to put a bid order myself that´s higher? The funny thing is, at some point it stops when you get really close to the best ask price. I tried playing a bit with it myself - first getting the best price by putting my bid slightly below the lowest ask price, but still too far from the next highest bid (I´m the highest) to want to change. Then after that I´ll be putting a bid order so that the existing highest one(s) will want to beat me, and then I take my bid away and sell
Corey Hart
CC BY-SA 4.0
2018-07-03T23:49:56.057Z
This however still is with a loss to me although I manage to make the lowest seller go a bit lower on his price for me, but at least I managed to - maybe - fool some bot that way, by getting a lower price than the best ask, and a better price when I sold than the best bid.
Corey Hart
CC BY-SA 4.0
2018-07-03T23:50:51.547Z
Do you think what I´m describing is a spoofing bot operating behind the scene? We´re talking about very tiny amounts here.. no walls are interfering at this level.
Corey Hart
CC BY-SA 4.0
2018-07-04T20:39:09.037Z
And, for not trusting the orderbook. . if you have the data coming live to you, it´s IMO the best thing to do.. let´s say you want to sell 0.04 of something that you bought for 0.035, and the first bid order is 0.045. Good for you, except for that the volume in that first order is only 0.002, and the next bid is at 0.03 and still does not hold enough volume to fill your order. In other words, you´ll lose that way by only looking at h/l/last prices.
Corey Hart
CC BY-SA 4.0
2018-06-28T07:25:00.687Z
2018-06-28T07:25:00.687Z
Laser-Lance
<p>I have noticed that if I put a buy order up - for instance - on any not so heavily traded coin, if close to the highest bid, often within 20 secs the highest bid will try to beat me.
Or when I put it close to the lowest ask price, often it won´t take long till I get someone to sell it to me. 
Before this there can have been hours with no activity.
To me, this does not look like bots that are set up to track MDA or other common strategies, but the exchanges own bots reacting to certain inputs.
Does somebody know more about the algorithms used by the crypto exchanges, which behaves this way?</p>

<p>Thanks in advance!</p>

<exchanges><altcoin><algorithms>
Crypto exchanges algorithms
Corey Hart
# Crypto exchanges algorithms

(Asked by: username_0 on 2018-06-28)

I have noticed that if I put a buy order up - for instance - on any not so heavily traded coin, if close to the highest bid, often within 20 secs the highest bid will try to beat me.
Or when I put it close to the lowest ask price, often it won´t take long till I get someone to sell it to me.
Before this there can have been hours with no activity.
To me, this does not look like bots that are set up to track MDA or other common strategies, but the exchanges own bots reacting to certain inputs.
Does somebody know more about the algorithms used by the crypto exchanges, which behaves this way?

Thanks in advance!

**Tags:** exchanges, altcoin, algorithms


---

## 2 answers

### Answer by username_1 on 2018-08-09. Score: 1

you're providing alpha to "high frequency market makers". Since they can tell that you are not a bot, they are assuming its a real bid, so they can bid on top of you and then they are now in a risk free position.

if they get hit, they will immediately place an ask at a price of: last + (last-bid). they will wait hoping you will pay up, they may even entice you by placing another bid higher... then (within a couple of seconds) they will hit your bid, and take the small loss.

as long as the spread is much wider than the tic above you, they are in positive alpha.

in general, you should not try to play this game. just place "marketable" limit orders.. so buys at the best ask, and sells at the best bid, otherwise you are giving away your hand.

> **Comments:**
> **username_0**: Thanks, that makes good sense. Although I was more curious about what´s going on than actually trying to "play this game", why wouldn´t I? If I can do what they do, buying low getting myself in among the bids and selling high doing the same on the asks, there should be a good chance that I´ll suceed making a bit myself as well, right?  
> **username_1**: no. you would be competing with the most advanced high-frequency market making algos. it has been impossible to compete with these since 2007 - i used to code them for hedge funds  
> **username_0**: Ok, so you´re saying that the algos on cryptoexchanges (which did not exist in 2007) are the same as those on standard exchanges fro futures, forex etc?  Did anything special happen in 2007, some sort of algo revolution?  
> **username_1**: yes. pretty much the same. eventually all the alpha gets arbitraged out  - high-frequency "stat arb" - just stopped working around that time.  

---

### Answer by username_2 on 2018-06-28. Score: 0

I'm having a tough time understanding you, but if I try to extrapolate what you're saying, I think it's other traders who are out-bidding you, not the exchange itself. With so many bots out there, I think many people use them to trade, which could cause extra activity in a market that was otherwise dormant for a while. I use ClueDex TrendSockets to see real-time market data and often there will be dormant markets that suddenly get interest and begin trading. If no trading occurs on a market it means that there is no consensus on the price. Every one of those orders in the Order Book are real orders, but if the price never matches, there is no market and nothing is exchanged. The exchange algorithm only tries to find price matches. When you place a sell order, you are putting the price that is the lowest you are willing to sell that coin for. When you place a buy order, you are putting the highest price that you are willing to pay for that coin.

> **Comments:**
> **username_0**: Thanks, I know the mechanics of an exchange when it comes to bids and asks. You may be right of course that it´s the bots of other clients that are doing what I see. But as far as I know, such bots base themselfes on wellknown trading strategies and this is where I don´t see the described actions fitting in.  
> **username_0**: Let´s say I put a bid order that converts into 0.0007 BTC at price 0.00003432. Untill then, the highest bid was 0.00003430. Now the previous highest bidder moves up til 0.00003433. Why would a private bot do this?  
> **username_0**: I do understand that there may be some sort of "buy as low as possible, but make sure that you buy, but not as high as the lowest sell order" strategy in place but to me it seems more likely that it´s the exchange trying to drive the price that I am willing to buy for up. Exchanges also hold coins - it´s not only the clients that do so.  And well, these are the algos I´m curious about how works in detail - whether if deriving from private bots, or bots owned by exchanges.  
> **username_2**: I believe it would be unethical for an exchange to do this so I am giving the exchange the benefit of the doubt. You're right in that this behavior is to drive the price up. It's called "spoofing" where a trader will place multiple orders at higher prices without an intention on ever having them filled--they are withdrawn before they can be filled. The increase in activity can drive more people to trade, which ultimately stimulates the market and causes a price fluctuation. There's also something called a "wall" where someone puts a large volume of shares up at a higher price than others.  
> **username_2**: This is one reason to never trust the order book if writing a trading bot of one's own. Nothing matters in the market until the order is filled, but I still see people writing bots that use data other than the highest bid, lowest ask, and last price, to make a trading decision. That's very dangerous.  
> **username_0**: I don´t know if exchanges are ethical, but you´re saying that somebody may already hold this asset and then try and trick me to put a bid order myself that´s higher? The funny thing is, at some point it stops when you get really close to the best ask price. I tried playing a bit with it myself - first getting the best price by putting my bid slightly below the lowest ask price, but still too far from the next highest bid (I´m the highest) to want to change. Then after that I´ll be putting a bid order so that the existing highest one(s) will want to beat me, and then I take my bid away and sell  
> **username_0**: This however still is with a loss to me although I manage to make the lowest seller go a bit lower on his price for me, but at least I managed to - maybe - fool some bot that way, by getting a lower price than the best ask, and a better price when I sold than the best bid.  
> **username_0**: Do you think what I´m describing is a spoofing bot operating behind the scene? We´re talking about very tiny amounts here.. no walls are interfering at this level.  
> **username_0**: And, for not trusting the orderbook. . if you have the data coming live to you, it´s IMO the best thing to do.. let´s say you want to sell 0.04 of something that you bought for 0.035, and the first bid order is 0.045. Good for you, except for that the volume in that first order is only 0.002, and the next bid is at 0.03 and still does not hold enough volume to fill your order. In other words, you´ll lose that way by only looking at h/l/last prices.  

---

