Closed gegenki closed 3 years ago
I'm curious to know how you decided this is an error. People could be self-trading or trading bots could be doing all sorts of weird stuff, especially when trade volume is extremely thin. I can imagine that someone could pump prices this way by making small self-trades at higher prices that fill when no one else is trading hoping to hit some trading bot price thresholds in order for them to pile in when they detect the transaction.
Looking for 'match' rather than 'filled' does solve the issue for me.
Rather than deleting all the additional data I just wrote it to the database. Over the same period, many of the fills are at totally different prices to the matches. I am also interested in what uclatommy means because - I have no idea what that data is supposed to represent.
@noah222, I think this is only possible when trading volume is very thin, like what gegenki shows in the graph. You can see that at some periods, there are no trades suggesting that there is a wide buy-sell spread. When no one is trading, I imagine you could create a limit sell at the high end, then a limit buy with the exact same price, and the two orders will match each other. Coinbase defines market orders as maker orders and limit orders as taker orders in their pricing structure, but I'm guessing that distinction is just for pricing. There should be no reason why a limit order cannot match another limit order.
Resolved. Closing.
Simple code looks like this.
Every 30 seconds it removes anything I don't care about from the database. Ran it last night and tried to calculate the close price at each minute this morning. Found some strange values. Checked the log
This shows a BTC-EUR order filled last night at 1:45 UTC for at a price of 5168.05. The price hasn't been that high since November. If I check on GDAX, the price at that time was 4505
(Note - time difference is because my computer is in UTC+1)
I have many examples of these supposedly filled trades at wildly inaccurate prices.