0
Recently I recieved $500 USD in credits for trading with Coinsetter, a NYC based bitcoin exchange, so I decided to use them and coded a bitcoin trading bot for myself (never have done such thing before); The problem I'm having right now is that my bot seem to be "buying higher, selling lower" and I don't know why, you see:
If I go to the bot's logs, I get something like this:

The prices shown there are the prices at which the market order is requested, (giving an invalid price as an argument for the API request supposedly results in a failed order, so I request the live price first from coinsetter twice before I do a buy/sell operation); BUT if we go to the coinsetter transaction history we have this instead:

So everytime I do a BUY I pump up the market, and every time I do a sell I dump it, how can this be avoided? I'd prefer buying at the lower prices and selling at the higher ones.
P.S. Another question would be: What you think is the real price at which I'm buying/selling? The price I REQUEST or the price coinsetter tells me at it's history?
Thanks for your advice.
So basically there's no way to have a "market order based" profitable bot? – Jmlevick – 2015-02-09T22:27:01.740
1Of course you can make one. You just need a strategy that sells higher than when you buy based on price movements. It's just that the prices are stacked in a way as to make that hard. – Jimmy Song – 2015-02-09T22:31:27.957
Now I know what to do... Thanks! after doing some research and reading your comment I understood the problem well, marking this answer as accepted. – Jmlevick – 2015-02-09T22:40:55.937