summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2026-09-29 21:48:03 +0800
committerXiao Pan <xyz@flylightning.xyz>2026-09-29 21:48:03 +0800
commitbe0f96978d0550097f0a364ba80ee0edc881b617 (patch)
treecd0ca84ca79048c600e2ca03f1c077398a9c8ff0
parent17df8f6f77fe4baa7bfe317c52fcbd966fcaa9fb (diff)
rate switch back to old way
-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