How to get historic prices?
Anyone familiar with the Kraken API?

How can you retrieve the price of a currency pair for a date in the past? I need this for some feature I'm working on.

For example, what request should I make to get the value of one BTC in USD on say 03-03-2017 at 10am ?
In gekko UI import is easy. Tried?

Here You have imported files:
My projects [Strategies] [Datasets]
Thanks for your help. I'm aware that there is a way to import all historic data. That's not what I'm after. My question is about the API specifically.

Let me explain a bit further. Suppose you have a long history of trades in different currencies A and B and you wish to calculate the PnL of these trades in another currency P.  For example  you've traded  ETH vs BTC and you'd want to calculate the PnL result between (any) two of these trades in USD. From the trades themselves you can read of what the ETHBTC price was.  To get a result in USD, you'd also need to know the BTCUSD price at the moment of the first trade and of the second trade.  (The ETHUSD price can then be implied from  ETHUSD = ETHBTC * BTCUSD)

Instead of downloading the entire price history, I'd like to make a simple request to the API to just get one price for one pair at one moment in the past.

Do you know how to do this for Kraken or any other website / exchange / other API? That would be really helpful.

Forum Jump:

Users browsing this thread: