I want to build historical OHLC data from the Kraken trades. Since Kraken does not provide historical OHLC data (at least not going far back), they recommend one builds it oneself using the list of trades (https://support.kraken.com/hc/en-us/articles/218198197-How-to-pull-all-trade-data-using-the-Kraken-REST-API). Their trades API does indeed return trades as far back as October 2013, but I do not understand how to interpret the data.
They return the following information for each trade (see https://www.kraken.com/help/api#get-recent-trades):
- Price
- Volume
- Time
- Buy/sell
- Market/limit
All of these make sense except the last one, market/limit. How can a trade be a market trade or a limit trade? I am very familiar with market and limit orders, but I thought that every trade is a market order matched against one or more limit orders. So how can a trade be market or limit?
Can I perhaps treat a market sell trade as a limit buy trade and vice versa? And so it would just be random whether they call it market sell or limit buy? This would seem a little odd to me...
Any insight would be appreciated!