Bitcoin Forum
June 22, 2024, 07:43:44 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Understanding Kraken Trades API (market/limit)  (Read 442 times)
Flecto (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
September 07, 2017, 08:23:47 PM
 #1

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!
Serpens66
Legendary
*
Offline Offline

Activity: 2926
Merit: 1131



View Profile
September 08, 2017, 10:23:40 AM
 #2

Why are you interesetd in market/limit when oyu want to create OHLC ? You do not need market/limit information for that Cheesy

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.

Mit Cointracking (10% Rabatt) behältst du die Übersicht über all deine Trades und Gewinne. Sogar ein Tool für die Steuer ist dabei Wink                          
Great Freeware Game: Clonk Rage
binance.com hat nun auch SEPA und EUR Paare! Mit dem RefLink bekommst du 5% Rabatt auf die Tradinggebühren!
Flecto (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
September 09, 2017, 03:07:41 AM
 #3

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  Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!