summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-rwxr-xr-xsh/rate9
1 files changed, 5 insertions, 4 deletions
diff --git a/sh/rate b/sh/rate
index 16cab21..1824e77 100755
--- a/sh/rate
+++ b/sh/rate
@@ -1,10 +1,11 @@
#!/bin/sh
-units -t XMR USD
-
-# old way:
# https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getTickerInformation
# click url/ result to see more return data descriptions
# last 24 hours volume weighted average price
# XXMRZUSD seems same as XMR/USD, but don't know how to query XMR/USD via jq
-#curl -sS "https://api.kraken.com/0/public/Ticker?pair=XXMRZUSD" | jq -r .result.XXMRZUSD.p.[1]
+curl -sS "https://api.kraken.com/0/public/Ticker?pair=XXMRZUSD" | jq -r .result.XXMRZUSD.p.[1]
+
+# Another less reliable way, due to `units_cur` sometimes error, maybe due to
+# api website 403 error
+#units -t XMR USD