How to avoid price pumps & dumps when trading with bot?
In a normal exchange, you have an order book of buys and sells. Usually, they don't cross over, that is, if the highest buy is 219, the lowest sell will be higher than that.

What you're doing is buying at market (aka market order) so any buys you do simply match the lowest sell and any sells you do simply match the highest buy. Whenever the two cross, they are simply filled by each other, so the gap will be there 99% of the time.

What you can do if you want to avoid this is to use limit orders. Generally, though, you have to wait for them to fill as you need price movement in order for that to happen.