1.0.0 • Published 6 years ago

cryptomonitor v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

cryptomonitor

This is a crypto price monitor support ifttt-like experience, with configurable parameters such as price feed, margin call ratio, etc.

install

npm i cryptomonitor

demo

const queryCTL = require("cryptomonitor");  

let config = {
    assets: [
        {
            coin: "ethereum",
            sym: "eth",
            count: 0.5
        },
        {
            coin: "bitcoin",
            sym: "btc",
            count: 0.1
        }
    ],
    debt: 400
};


let margincall = 2;
let margincall_callback = (r) => {
    console.log("alert!! " + r);
}

async function test() {
    var rate = await queryCTL(config, margincall, margincall_callback);
    console.log(rate);
}

test();

CTL ifttt extension

Demo code in extension/httpServer.js

You can find margincall service in ifttt. Alt text

Set your collateral eth count,lend stable coin count and alert ctl line, if your ctl is lt alert line,you will receive alert. Alt text

1.0.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago