Loading...

Accessing Kraken API Data With R

After several requests, we have re-produced the Kraken Python tutorial into R for users. This R script will access the Kraken API for a given cryptocurrency pair, return the historical Open, High, Low, Close, Volume, VWAP, and TradeCount; then enrich with Volume in USD terms and a user-readable datatime before saving to a CSV file.
(*Please note that Kraken's API has terms of service and market data usage that may have restrictions not covered here, and so you should consult with Kraken directly if you have any questions concerning their API - this tutorial is not officially endorsed by Kraken, and CDD is not affiliated with the Kraken exchange. This tutorial should be used for your personal informational purposes*).
The R script uses these 3 libraries: jsonlite, glue, and anytime. jsonlite library helps read the data received via the API. glue library helps to format string variables in our function and other places. The anytime library makes it easy to convert unix timestamps into UTC or other timezones. This code is very similar to the function we wrote for the Coinbase API, but requires a few extra modifications for Kraken's API.




Notice: Information contained herein is not and should not be construed as an offer, solicitation, or recommendation to buy or sell securities. The information has been obtained from sources we believe to be reliable; however no guarantee is made or implied with respect to its accuracy, timeliness, or completeness. Author does not own the any crypto currency discussed. The information and content are subject to change without notice. CryptoDataDownload and its affiliates do not provide investment, tax, legal or accounting advice.

This material has been prepared for informational purposes only and is the opinion of the author, and is not intended to provide, and should not be relied on for, investment, tax, legal, accounting advice. You should consult your own investment, tax, legal and accounting advisors before engaging in any transaction. All content published by CryptoDataDownload is not an endorsement whatsoever. CryptoDataDownload was not compensated to submit this article. Please also visit our Privacy policy; disclaimer; and terms and conditions page for further information.