Skip to content

Instantly share code, notes, and snippets.

@remkohdev
Last active January 17, 2018 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remkohdev/ee4307da8c4c6994e9203147bd6277ac to your computer and use it in GitHub Desktop.
Save remkohdev/ee4307da8c4c6994e9203147bd6277ac to your computer and use it in GitHub Desktop.
Simple Examples for CryptoCompare API Nodes

Simple and straightforward usage examples showing how to use the nodes in the CryptoCompare API package for:

  • CoinList
  • CoinSnapshot
  • CoinSnapshotFullById
  • HistoDay
  • HistoHour
  • HistoMinute
  • MiningContracts
  • MiningEquipment
  • Price
  • PriceHistorical
  • SocialStats
  • TopPairs

Github: https://github.com/remkohdev/node-red-contrib-cryptocompare

NPM: https://www.npmjs.com/package/node-red-contrib-cryptocompare

Medium how-to: https://medium.com/nycdev/your-first-contribution-to-open-source-javascript-and-node-red-5fa7934c764d

[{"id":"3f2abe8e.5504c2","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":112.0173568725586,"y":44.96181297302246,"wires":[["1cb8577.51c1ba9"]]},{"id":"94e91f2.9a84fe","type":"debug","z":"e818aea6.b03c","name":"log1-1","active":true,"console":"false","complete":"payload","x":509.49999618530273,"y":44,"wires":[]},{"id":"1cb8577.51c1ba9","type":"coinlist","z":"e818aea6.b03c","name":"","x":311.0208435058594,"y":45.26388931274414,"wires":[["94e91f2.9a84fe"]]},{"id":"9bb7ceb0.c9264","type":"toppairs","z":"e818aea6.b03c","name":"","fsym":"","tsym":"","limit":"","sign":"","x":490.01391220092773,"y":620.2187666893005,"wires":[["36e13f52.b4f4"]]},{"id":"5cc0b776.20f678","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"LTC","payloadType":"str","repeat":"","crontab":"","once":false,"x":114.02079391479492,"y":619.9687261581421,"wires":[["3d6d02f6.41763e"]]},{"id":"3d6d02f6.41763e","type":"function","z":"e818aea6.b03c","name":"Set UrlParams","func":"msg.params = {\n fsym : \"LTC\",\n tsym : \"USD\"\n};\nreturn msg;","outputs":1,"noerr":0,"x":301.01736068725586,"y":620.6318674087524,"wires":[["9bb7ceb0.c9264","4daa9c7e.f822d4"]]},{"id":"36e13f52.b4f4","type":"debug","z":"e818aea6.b03c","name":"log12-2","active":true,"console":"false","complete":"payload","x":643.0243072509766,"y":619.6076011657715,"wires":[]},{"id":"4daa9c7e.f822d4","type":"debug","z":"e818aea6.b03c","name":"log12-1","active":true,"console":"false","complete":"true","x":492.0277404785156,"y":668.6076393127441,"wires":[]},{"id":"7fbd36f6.d145e8","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"1182","payloadType":"num","repeat":"","crontab":"","once":false,"x":110.02082824707031,"y":535.968747138977,"wires":[["2d9c5824.4e6518"]]},{"id":"93075f38.34ee6","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":114.02777099609375,"y":223.9686975479126,"wires":[["2ab2bc8d.f58564"]]},{"id":"c9ab6d4f.3b10b","type":"histohour","z":"e818aea6.b03c","name":"","fsym":"","tsym":"","e":"CCCAGG","extraParams":"","sign":"","tryConversion":"","aggregate":"","limit":"","toTs":"","x":486.0173530578613,"y":223.5312042236328,"wires":[["26a1244b.9435dc"]]},{"id":"2d9c5824.4e6518","type":"function","z":"e818aea6.b03c","name":"Set UrlParams","func":"var id = \"\";\nif(msg.payload!==null && msg.payload!==\"\"){\n id = msg.payload;\n msg.params = {id : id};\n}\nreturn msg;","outputs":1,"noerr":0,"x":301.02091217041016,"y":535.6388454437256,"wires":[["73739bb8.379034","caee02c.a38d6"]]},{"id":"2ab2bc8d.f58564","type":"function","z":"e818aea6.b03c","name":"Set UrlParams","func":"\nmsg.params = {\n fsym : \"LTC\",\n tsym : \"USD\",\n limit : 5\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":306.02783966064453,"y":223.63889694213867,"wires":[["c9ab6d4f.3b10b","7b963a61.430104"]]},{"id":"73739bb8.379034","type":"debug","z":"e818aea6.b03c","name":"log11-1","active":true,"console":"false","complete":"true","x":487.01731872558594,"y":577.597195148468,"wires":[]},{"id":"7b963a61.430104","type":"debug","z":"e818aea6.b03c","name":"log5-1","active":true,"console":"false","complete":"true","x":478.0138931274414,"y":258.60411643981934,"wires":[]},{"id":"86453b00.6199c8","type":"debug","z":"e818aea6.b03c","name":"log11-2","active":true,"console":"false","complete":"payload","x":659.0277519226074,"y":536.6076164245605,"wires":[]},{"id":"26a1244b.9435dc","type":"debug","z":"e818aea6.b03c","name":"log5-2","active":true,"console":"false","complete":"payload","x":635.0174026489258,"y":223.59718990325928,"wires":[]},{"id":"c945fe54.0002f","type":"coinsnapshot","z":"e818aea6.b03c","name":"","fsym":"","tsym":"","x":506.02087020874023,"y":88.7882022857666,"wires":[["4138aa00.00c908"]]},{"id":"e8527bf3.41e828","type":"histoday","z":"e818aea6.b03c","name":"","fsym":"","tsym":"","e":"","extraParams":"","sign":"","tryConversion":"","aggregate":"","limit":"","toTs":"","allData":"","x":485.02777099609375,"y":178.70488739013672,"wires":[["c4debbb.9f58448"]]},{"id":"8d46f74a.b07218","type":"histominute","z":"e818aea6.b03c","name":"","fsym":"","tsym":"","e":"","extraParams":"","sign":"","tryConversion":"","aggregate":"","limit":"","toTs":"","x":498.01387786865234,"y":309.086820602417,"wires":[["76c6fa35.8b0804"]]},{"id":"e31f27d6.87e178","type":"miningcontracts","z":"e818aea6.b03c","name":"","x":303.0242691040039,"y":358.04516983032227,"wires":[["5eaeac29.0b8344"]]},{"id":"a007e252.ee92","type":"miningequipment","z":"e818aea6.b03c","name":"","fsym":"","tsym":"","e":"","extraParams":"","sign":"","tryConversion":"","aggregate":"","limit":"","toTs":"","x":311.0277786254883,"y":403.0243616104126,"wires":[["860b1141.594f6"]]},{"id":"d301d1cd.45146","type":"price","z":"e818aea6.b03c","name":"","fsym":"","tsyms":"","e":"","extraParams":"","sign":"","tryConversion":"","x":477.0207977294922,"y":444.98270988464355,"wires":[["4f50a9e1.dc9c18"]]},{"id":"aa5df4cf.918e98","type":"pricehistorical","z":"e818aea6.b03c","name":"","fsym":"","tsyms":"","ts":"","markets":"","extraParams":"","sign":"","tryConversion":"","x":504.0173873901367,"y":493.0626106262207,"wires":[["f46283eb.a4c1f"]]},{"id":"510d3b64.e04a64","type":"coinsnapshotfullbyid","z":"e818aea6.b03c","name":"","x":523.0277557373047,"y":132.18408203125,"wires":[["6ef4e4cb.643a1c"]]},{"id":"9be0f8e2.a84ac8","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":115.02778244018555,"y":88.96182250976562,"wires":[["6de2ddaf.178694"]]},{"id":"9faa116e.e5883","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":114.01387786865234,"y":132.96527576446533,"wires":[["32ea01cb.c83ebe"]]},{"id":"9641f4d8.9b3778","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":113.01387786865234,"y":178.9652805328369,"wires":[["456732bf.f1fe2c"]]},{"id":"fc93a38a.2b92a","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":114.01387786865234,"y":308.9722709655762,"wires":[["3496da58.bb9266"]]},{"id":"6d6fe7e8.961ff8","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":116.01388168334961,"y":357.9583520889282,"wires":[["e31f27d6.87e178"]]},{"id":"e87b5d4e.9ee5c","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":116.02776336669922,"y":402.95838928222656,"wires":[["a007e252.ee92"]]},{"id":"64839e29.45bde","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":116.02429962158203,"y":444.96187591552734,"wires":[["6c4acc2a.71b264"]]},{"id":"2c464ea1.c84a02","type":"inject","z":"e818aea6.b03c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":119.02776336669922,"y":490.9688243865967,"wires":[["6efbba8e.62be44"]]},{"id":"6de2ddaf.178694","type":"function","z":"e818aea6.b03c","name":"Set UrlParams","func":"msg.params = {\n fsym : \"LTC\",\n tsym : \"USD\"\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":307.51739501953125,"y":89.01041221618652,"wires":[["c945fe54.0002f"]]},{"id":"4138aa00.00c908","type":"debug","z":"e818aea6.b03c","name":"log2-2","active":true,"console":"false","complete":"payload","x":668.0243263244629,"y":89.59375381469727,"wires":[]},{"id":"6ef4e4cb.643a1c","type":"debug","z":"e818aea6.b03c","name":"log3-2","active":true,"console":"false","complete":"payload","x":701.0242729187012,"y":132.6007251739502,"wires":[]},{"id":"c4debbb.9f58448","type":"debug","z":"e818aea6.b03c","name":"log4-2","active":true,"console":"false","complete":"payload","x":636.0139312744141,"y":178.59722328186035,"wires":[]},{"id":"76c6fa35.8b0804","type":"debug","z":"e818aea6.b03c","name":"log6-2","active":true,"console":"false","complete":"payload","x":653.0242805480957,"y":308.59379863739014,"wires":[]},{"id":"5eaeac29.0b8344","type":"debug","z":"e818aea6.b03c","name":"log7-2","active":true,"console":"false","complete":"payload","x":476.017391204834,"y":358.6041898727417,"wires":[]},{"id":"860b1141.594f6","type":"debug","z":"e818aea6.b03c","name":"log8-2","active":true,"console":"false","complete":"payload","x":476.0242805480957,"y":402.59383964538574,"wires":[]},{"id":"4f50a9e1.dc9c18","type":"debug","z":"e818aea6.b03c","name":"log9-2","active":true,"console":"false","complete":"payload","x":624.0139274597168,"y":444.6007947921753,"wires":[]},{"id":"f46283eb.a4c1f","type":"debug","z":"e818aea6.b03c","name":"log10-2","active":true,"console":"false","complete":"payload","x":681.0173759460449,"y":490.6043310165405,"wires":[]},{"id":"456732bf.f1fe2c","type":"function","z":"e818aea6.b03c","name":"Set UrlParams","func":"msg.params = {\n fsym : \"LTC\",\n tsym : \"USD\",\n e : \"CCCAGG\",\n limit : 5\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":304.51739501953125,"y":179.01043319702148,"wires":[["e8527bf3.41e828"]]},{"id":"32ea01cb.c83ebe","type":"function","z":"e818aea6.b03c","name":"Set UrlParams","func":"msg.params = {\n id : 1182\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":306.5173873901367,"y":133.0103998184204,"wires":[["510d3b64.e04a64"]]},{"id":"3496da58.bb9266","type":"function","z":"e818aea6.b03c","name":"Set UrlParams","func":"\nmsg.params = {\n fsym : \"LTC\",\n tsym : \"USD\",\n e : \"CCCAGG\",\n limit : 5\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":302.5173873901367,"y":309.01040744781494,"wires":[["8d46f74a.b07218"]]},{"id":"6c4acc2a.71b264","type":"function","z":"e818aea6.b03c","name":"Set UrlParams","func":"\nmsg.params = {\n fsym : \"LTC\",\n tsyms : \"USD\"\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":301.5173568725586,"y":445.34374809265137,"wires":[["d301d1cd.45146"]]},{"id":"6efbba8e.62be44","type":"function","z":"e818aea6.b03c","name":"Set UrlParams","func":"\nmsg.params = {\n fsym : \"LTC\",\n tsyms : \"USD\",\n markets : \"CCCAGG\"\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":301.5173797607422,"y":492.3437719345093,"wires":[["aa5df4cf.918e98"]]},{"id":"caee02c.a38d6","type":"socialstats","z":"e818aea6.b03c","name":"","coinId":"","x":497.12843322753906,"y":535.142427444458,"wires":[["86453b00.6199c8"]]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment