Kraken Ripple Tracker

Hey all, figured I would dump this here for anyone wanting to track pairs on Kraken. I’m using it for ripple at the moment but can EASILY be tweaked for other pairs. If you have any questions, let me know! This is dependent on krakenx which can be found here: https://github.com/veox/python3-krakenex

Python script:

import krakenex
k = krakenex.API()
data = k.query_public('Ticker',{'pair': 'XXRPZUSD'})
value = data['result']['XXRPZUSD']['c'][0]
print(value)

Home Assistant sensor config:

- platform: command_line
  name: "XRP to USD"
  command: 'python3 /scripts/kraken_ripple.py'
  unit_of_measurement: "USD"

Hope someone finds it helpful!

1 Like

thanks for this. Did you ever got access to Kraken’s API with token to check your account balance?

you could use GitHub - zertrin/clikraken: Command-line client for the Kraken exchange for that