summaryrefslogtreecommitdiffstats
path: root/lass/1systems/mors
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-04-20 23:27:53 +0200
committerlassulus <lassulus@lassul.us>2018-04-20 23:37:15 +0200
commitddb06a55426abe797b4ebad3165c4637c0b6975d (patch)
treed83474d74c037c019b2aaf6ffd0108e42c3da640 /lass/1systems/mors
parent4fac738ed2092c8922b5126903bac3f258bf22f4 (diff)
l mors.r: add btc price getter
Diffstat (limited to 'lass/1systems/mors')
-rw-r--r--lass/1systems/mors/config.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix
index cd259d0fe..dab1910b4 100644
--- a/lass/1systems/mors/config.nix
+++ b/lass/1systems/mors/config.nix
@@ -141,6 +141,15 @@ with import <stockholm/lib>;
dnsutils
generate-secrets
+ (pkgs.writeDashBin "btc-coinbase" ''
+ ${pkgs.curl}/bin/curl -Ss 'https://api.coinbase.com/v2/prices/spot?currency=EUR' | ${pkgs.jq}/bin/jq '.data.amount'
+ '')
+ (pkgs.writeDashBin "btc-wex" ''
+ ${pkgs.curl}/bin/curl -Ss 'https://wex.nz/api/3/ticker/btc_eur' | ${pkgs.jq}/bin/jq '.btc_eur.avg'
+ '')
+ (pkgs.writeDashBin "btc-kraken" ''
+ ${pkgs.curl}/bin/curl -Ss 'https://api.kraken.com/0/public/Ticker?pair=BTCEUR' | ${pkgs.jq}/bin/jq '.result.XXBTZEUR.a[0]'
+ '')
];
#TODO: fix this shit