Created
December 15, 2017 10:06
-
-
Save torinnguyen/207ce9240cc2f59aec0aa302f7d55452 to your computer and use it in GitHub Desktop.
NodeRED flow for displaying 8 different live crypto prices from Bitfinex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"f2d4dc37.a9597","type":"tab","label":"Crypto Dashboard","disabled":false,"info":""},{"id":"825738b.9384dc8","type":"inject","z":"f2d4dc37.a9597","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"15","crontab":"","once":true,"x":110,"y":160,"wires":[["16b87a0f.7f5016"]]},{"id":"3890a4b6.16590c","type":"comment","z":"f2d4dc37.a9597","name":"BTC Bitfinex","info":"","x":130,"y":120,"wires":[]},{"id":"16b87a0f.7f5016","type":"http request","z":"f2d4dc37.a9597","name":"","method":"GET","ret":"obj","url":"https://api.bitfinex.com/v2/ticker/tBTCUSD","tls":"","x":260,"y":160,"wires":[["427f4698.6ff638"]]},{"id":"427f4698.6ff638","type":"function","z":"f2d4dc37.a9597","name":"","func":"var btcusd = Math.round(msg.payload[6] * 10) / 10;\nif (isNaN(btcusd) || btcusd <= 0)\n return;\nvar string = btcusd;\nmsg.payload = string;\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":160,"wires":[["404b32a0.90834c","d35ac010.6d64a"]]},{"id":"404b32a0.90834c","type":"function","z":"f2d4dc37.a9597","name":"Save BTCUSD","func":"node.status({fill:\"blue\", shape:\"dot\", text:msg.payload});\n\nglobal.set(\"btcusd\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":180,"wires":[[]]},{"id":"88d023d6.ccc0b","type":"ui_chart","z":"f2d4dc37.a9597","name":"","group":"584db9fb.704b68","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":720,"y":140,"wires":[[],[]]},{"id":"6f4d855e.d2808c","type":"inject","z":"f2d4dc37.a9597","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"15","crontab":"","once":true,"x":110,"y":300,"wires":[["dd4d0ab2.58eba8"]]},{"id":"162b1bb4.428b84","type":"comment","z":"f2d4dc37.a9597","name":"ETH Bitfinex","info":"","x":130,"y":260,"wires":[]},{"id":"dd4d0ab2.58eba8","type":"http request","z":"f2d4dc37.a9597","name":"","method":"GET","ret":"obj","url":"https://api.bitfinex.com/v2/ticker/tETHUSD","tls":"","x":260,"y":300,"wires":[["ab4b083c.ccbd68"]]},{"id":"ab4b083c.ccbd68","type":"function","z":"f2d4dc37.a9597","name":"","func":"var btcusd = Math.round(msg.payload[6] * 100) / 100;\nif (isNaN(btcusd) || btcusd <= 0)\n return;\nvar string = btcusd;\nmsg.payload = string;\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":300,"wires":[["953d43b8.21002","a66feee.332441"]]},{"id":"953d43b8.21002","type":"function","z":"f2d4dc37.a9597","name":"Save BTCUSD","func":"node.status({fill:\"blue\", shape:\"dot\", text:msg.payload});\n\nglobal.set(\"ethusd\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":320,"wires":[[]]},{"id":"3ff9a0f3.4af4d","type":"ui_chart","z":"f2d4dc37.a9597","name":"","group":"26d9fb63.acfa84","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":720,"y":280,"wires":[[],[]]},{"id":"559167b.e26a498","type":"inject","z":"f2d4dc37.a9597","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"15","crontab":"","once":true,"x":110,"y":450,"wires":[["4aa3b8ab.1353c8"]]},{"id":"659755c5.de170c","type":"comment","z":"f2d4dc37.a9597","name":"OMG Bitfinex","info":"","x":130,"y":410,"wires":[]},{"id":"4aa3b8ab.1353c8","type":"http request","z":"f2d4dc37.a9597","name":"","method":"GET","ret":"obj","url":"https://api.bitfinex.com/v2/ticker/tOMGUSD","tls":"","x":260,"y":450,"wires":[["31980c85.a5e194"]]},{"id":"31980c85.a5e194","type":"function","z":"f2d4dc37.a9597","name":"","func":"var btcusd = Math.round(msg.payload[6] * 1000) / 1000;\nif (isNaN(btcusd) || btcusd <= 0)\n return;\nvar string = btcusd;\nmsg.payload = string;\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":450,"wires":[["7f1b3c4a.988174","a9c4cbbe.8f6178"]]},{"id":"7f1b3c4a.988174","type":"function","z":"f2d4dc37.a9597","name":"Save BTCUSD","func":"node.status({fill:\"blue\", shape:\"dot\", text:msg.payload});\n\nglobal.set(\"omgusd\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":470,"wires":[[]]},{"id":"acc4c88.9194e38","type":"ui_chart","z":"f2d4dc37.a9597","name":"","group":"35ae862a.24db7a","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":720,"y":430,"wires":[[],[]]},{"id":"1a7bbd47.d890d3","type":"inject","z":"f2d4dc37.a9597","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"15","crontab":"","once":true,"x":110,"y":590,"wires":[["76e4a2bb.ec745c"]]},{"id":"f367111c.4e5c","type":"comment","z":"f2d4dc37.a9597","name":"XRP Bitfinex","info":"","x":130,"y":550,"wires":[]},{"id":"76e4a2bb.ec745c","type":"http request","z":"f2d4dc37.a9597","name":"","method":"GET","ret":"obj","url":"https://api.bitfinex.com/v2/ticker/tXRPUSD","tls":"","x":260,"y":590,"wires":[["34c1329f.f3a4de"]]},{"id":"34c1329f.f3a4de","type":"function","z":"f2d4dc37.a9597","name":"","func":"var btcusd = Math.round(msg.payload[6] * 1000) / 1000;\nif (isNaN(btcusd) || btcusd <= 0)\n return;\nvar string = btcusd;\nmsg.payload = string;\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":590,"wires":[["2715410d.42205e","5202ae26.d9bbf"]]},{"id":"2715410d.42205e","type":"function","z":"f2d4dc37.a9597","name":"Save BTCUSD","func":"node.status({fill:\"blue\", shape:\"dot\", text:msg.payload});\n\nglobal.set(\"xrpusd\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":610,"wires":[[]]},{"id":"b6c54385.cbaef","type":"ui_chart","z":"f2d4dc37.a9597","name":"","group":"28872b96.973044","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":720,"y":570,"wires":[[],[]]},{"id":"5202ae26.d9bbf","type":"ui_template","z":"f2d4dc37.a9597","group":"28872b96.973044","name":"","order":1,"width":"6","height":"4","format":"<style>\n .pricetext {\n font-size: 100px;\n }\n .currencytext {\n font-size: 50px;\n }\n</style>\n<div class=\"currencytext\">XRP</div>\n<div class=\"pricetext\" ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":580,"y":570,"wires":[["b6c54385.cbaef"]]},{"id":"a9c4cbbe.8f6178","type":"ui_template","z":"f2d4dc37.a9597","group":"35ae862a.24db7a","name":"","order":1,"width":"6","height":"4","format":"<style>\n .pricetext {\n font-size: 100px;\n }\n .currencytext {\n font-size: 50px;\n }\n</style>\n<div class=\"currencytext\">OMG</div>\n<div class=\"pricetext\" ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":580,"y":430,"wires":[["acc4c88.9194e38"]]},{"id":"a66feee.332441","type":"ui_template","z":"f2d4dc37.a9597","group":"26d9fb63.acfa84","name":"","order":1,"width":"6","height":"4","format":"<style>\n .pricetext {\n font-size: 100px;\n }\n .currencytext {\n font-size: 50px;\n }\n</style>\n<div class=\"currencytext\">ETH</div>\n<div class=\"pricetext\" ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":580,"y":280,"wires":[["3ff9a0f3.4af4d"]]},{"id":"d35ac010.6d64a","type":"ui_template","z":"f2d4dc37.a9597","group":"584db9fb.704b68","name":"","order":1,"width":"6","height":"4","format":"<style>\n .pricetext {\n font-size: 100px;\n }\n .currencytext {\n font-size: 50px;\n }\n</style>\n<div class=\"currencytext\">BTC</div>\n<div class=\"pricetext\" ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":580,"y":140,"wires":[["88d023d6.ccc0b"]]},{"id":"45b82c6f.8bba14","type":"inject","z":"f2d4dc37.a9597","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"15","crontab":"","once":true,"x":110,"y":730,"wires":[["c82fef30.f24d"]]},{"id":"69b87264.16f85c","type":"comment","z":"f2d4dc37.a9597","name":"LTC Bitfinex","info":"","x":130,"y":690,"wires":[]},{"id":"c82fef30.f24d","type":"http request","z":"f2d4dc37.a9597","name":"","method":"GET","ret":"obj","url":"https://api.bitfinex.com/v2/ticker/tLTCUSD","tls":"","x":260,"y":730,"wires":[["f9b7abc1.fb2208"]]},{"id":"f9b7abc1.fb2208","type":"function","z":"f2d4dc37.a9597","name":"","func":"var btcusd = Math.round(msg.payload[6] * 1000) / 1000;\nif (isNaN(btcusd) || btcusd <= 0)\n return;\nvar string = btcusd;\nmsg.payload = string;\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":730,"wires":[["560919b0.e1e938","a55de559.4e4638"]]},{"id":"560919b0.e1e938","type":"function","z":"f2d4dc37.a9597","name":"Save BTCUSD","func":"node.status({fill:\"blue\", shape:\"dot\", text:msg.payload});\n\nglobal.set(\"ltcusd\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":750,"wires":[[]]},{"id":"4a58d2a3.3f4ebc","type":"ui_chart","z":"f2d4dc37.a9597","name":"","group":"ebbd1359.0ad05","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":720,"y":710,"wires":[[],[]]},{"id":"a55de559.4e4638","type":"ui_template","z":"f2d4dc37.a9597","group":"ebbd1359.0ad05","name":"","order":1,"width":"6","height":"4","format":"<style>\n .pricetext {\n font-size: 100px;\n }\n .currencytext {\n font-size: 50px;\n }\n</style>\n<div class=\"currencytext\">LTC</div>\n<div class=\"pricetext\" ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":580,"y":710,"wires":[["4a58d2a3.3f4ebc"]]},{"id":"53930f82.f7e58","type":"inject","z":"f2d4dc37.a9597","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"15","crontab":"","once":true,"x":110,"y":860,"wires":[["e8084a89.944ef8"]]},{"id":"81bc531f.604c5","type":"comment","z":"f2d4dc37.a9597","name":"QASH Bitfinex","info":"","x":130,"y":820,"wires":[]},{"id":"e8084a89.944ef8","type":"http request","z":"f2d4dc37.a9597","name":"","method":"GET","ret":"obj","url":"https://api.bitfinex.com/v2/ticker/tQSHUSD","tls":"","x":260,"y":860,"wires":[["9772b625.98a518"]]},{"id":"9772b625.98a518","type":"function","z":"f2d4dc37.a9597","name":"","func":"var btcusd = Math.round(msg.payload[6] * 1000) / 1000;\nif (isNaN(btcusd) || btcusd <= 0)\n return;\nvar string = btcusd;\nmsg.payload = string;\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":860,"wires":[["7f5a382a.e17118","93c75998.b5e238"]]},{"id":"7f5a382a.e17118","type":"function","z":"f2d4dc37.a9597","name":"Save BTCUSD","func":"node.status({fill:\"blue\", shape:\"dot\", text:msg.payload});\n\nglobal.set(\"qashusd\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":880,"wires":[[]]},{"id":"1dbef79b.87a2e8","type":"ui_chart","z":"f2d4dc37.a9597","name":"","group":"b36491c1.a075c","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":720,"y":840,"wires":[[],[]]},{"id":"93c75998.b5e238","type":"ui_template","z":"f2d4dc37.a9597","group":"b36491c1.a075c","name":"","order":1,"width":"6","height":"4","format":"<style>\n .pricetext {\n font-size: 100px;\n }\n .currencytext {\n font-size: 50px;\n }\n</style>\n<div class=\"currencytext\">QASH</div>\n<div class=\"pricetext\" ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":580,"y":840,"wires":[["1dbef79b.87a2e8"]]},{"id":"7ae54d84.7b66f4","type":"inject","z":"f2d4dc37.a9597","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"15","crontab":"","once":true,"x":110,"y":1000,"wires":[["563ef056.1e55e"]]},{"id":"fca9d38f.b00fa","type":"comment","z":"f2d4dc37.a9597","name":"BCH Bitfinex","info":"","x":130,"y":960,"wires":[]},{"id":"563ef056.1e55e","type":"http request","z":"f2d4dc37.a9597","name":"","method":"GET","ret":"obj","url":"https://api.bitfinex.com/v2/ticker/tBCHUSD","tls":"","x":260,"y":1000,"wires":[["78501dbc.c364e4"]]},{"id":"78501dbc.c364e4","type":"function","z":"f2d4dc37.a9597","name":"","func":"var btcusd = Math.round(msg.payload[6] * 100) / 100;\nif (isNaN(btcusd) || btcusd <= 0)\n return;\nvar string = btcusd;\nmsg.payload = string;\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":1000,"wires":[["4128e230.7682bc","df7460f0.67151"]]},{"id":"4128e230.7682bc","type":"function","z":"f2d4dc37.a9597","name":"Save BTCUSD","func":"node.status({fill:\"blue\", shape:\"dot\", text:msg.payload});\n\nglobal.set(\"bchusd\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":1020,"wires":[[]]},{"id":"67f27ebe.c07ae","type":"ui_chart","z":"f2d4dc37.a9597","name":"","group":"c1574e54.ab206","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":720,"y":980,"wires":[[],[]]},{"id":"df7460f0.67151","type":"ui_template","z":"f2d4dc37.a9597","group":"c1574e54.ab206","name":"","order":1,"width":"6","height":"4","format":"<style>\n .pricetext {\n font-size: 100px;\n }\n .currencytext {\n font-size: 50px;\n }\n</style>\n<div class=\"currencytext\">BCH</div>\n<div class=\"pricetext\" ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":580,"y":980,"wires":[["67f27ebe.c07ae"]]},{"id":"2ad3b81d.55d268","type":"inject","z":"f2d4dc37.a9597","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"15","crontab":"","once":true,"x":110,"y":1140,"wires":[["be093757.f26f28"]]},{"id":"8823f6b3.777ec8","type":"comment","z":"f2d4dc37.a9597","name":"XMR Bitfinex","info":"","x":130,"y":1100,"wires":[]},{"id":"be093757.f26f28","type":"http request","z":"f2d4dc37.a9597","name":"","method":"GET","ret":"obj","url":"https://api.bitfinex.com/v2/ticker/tXMRUSD","tls":"","x":260,"y":1140,"wires":[["17fcdd3c.35b753"]]},{"id":"17fcdd3c.35b753","type":"function","z":"f2d4dc37.a9597","name":"","func":"var btcusd = Math.round(msg.payload[6] * 100) / 100;\nif (isNaN(btcusd) || btcusd <= 0)\n return;\nvar string = btcusd;\nmsg.payload = string;\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":1140,"wires":[["1272e02c.5c80f","9a1b55da.fd5688"]]},{"id":"1272e02c.5c80f","type":"function","z":"f2d4dc37.a9597","name":"Save BTCUSD","func":"node.status({fill:\"blue\", shape:\"dot\", text:msg.payload});\n\nglobal.set(\"xmrusd\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":1160,"wires":[[]]},{"id":"bbda2673.70f498","type":"ui_chart","z":"f2d4dc37.a9597","name":"","group":"4ff08a44.6c68a4","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":720,"y":1120,"wires":[[],[]]},{"id":"9a1b55da.fd5688","type":"ui_template","z":"f2d4dc37.a9597","group":"4ff08a44.6c68a4","name":"","order":1,"width":"6","height":"4","format":"<style>\n .pricetext {\n font-size: 100px;\n }\n .currencytext {\n font-size: 50px;\n }\n</style>\n<div class=\"currencytext\">XMR</div>\n<div class=\"pricetext\" ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":580,"y":1120,"wires":[["bbda2673.70f498"]]},{"id":"584db9fb.704b68","type":"ui_group","z":"","name":"BTC/USD","tab":"da5a5633.92d5c8","order":1,"disp":false,"width":"6"},{"id":"26d9fb63.acfa84","type":"ui_group","z":"","name":"ETH/USD","tab":"da5a5633.92d5c8","order":2,"disp":false,"width":"6"},{"id":"35ae862a.24db7a","type":"ui_group","z":"","name":"OMG/USD","tab":"da5a5633.92d5c8","order":4,"disp":false,"width":"6"},{"id":"28872b96.973044","type":"ui_group","z":"","name":"XRP/USD","tab":"da5a5633.92d5c8","order":5,"disp":false,"width":"6"},{"id":"ebbd1359.0ad05","type":"ui_group","z":"","name":"LTC/USD","tab":"da5a5633.92d5c8","order":6,"disp":false,"width":"6"},{"id":"b36491c1.a075c","type":"ui_group","z":"","name":"QASH/USD","tab":"da5a5633.92d5c8","order":3,"disp":false,"width":"6"},{"id":"c1574e54.ab206","type":"ui_group","z":"","name":"BCH/USD","tab":"da5a5633.92d5c8","order":8,"disp":false,"width":"6"},{"id":"4ff08a44.6c68a4","type":"ui_group","z":"","name":"XMR/USD","tab":"da5a5633.92d5c8","order":7,"disp":false,"width":"6"},{"id":"da5a5633.92d5c8","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment