Bitcoin Forum

Economy => Trading Discussion => Topic started by: Flecto on September 07, 2017, 08:23:47 PM



Title: Understanding Kraken Trades API (market/limit)
Post by: Flecto on September 07, 2017, 08:23:47 PM
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!


Title: Re: Understanding Kraken Trades API (market/limit)
Post by: Serpens66 on September 08, 2017, 10:23:40 AM
Why are you interesetd in market/limit when oyu want to create OHLC ? You do not need market/limit information for that :D

I think it simply means what order type the executing order was. So the order resting in the orderbook was abviously a limit order.
But the order which is matching it can be placed as market order or as limit order.
In sense of fees a limit order you place, that directly matched existing orders, is usually counted as a "market order" -> taker fee.
But still it was placed as a limit order and I think that is what kraken is telling us with that entry.
But still not sure, why anyone would need this info.


Title: Re: Understanding Kraken Trades API (market/limit)
Post by: Flecto on September 09, 2017, 03:07:41 AM
Thanks for your response. I agree that I don't need to know whether the trade was buy/sell or market/limit to construct OHLC data.

I'm just confused by the trades data provided and I'd like to understand it to satisfy my curiosity  :)