Hello,
I tried to connect to an api to return me the USD value of some crypto.
I would like to use the API provided by https://www.livecoinwatch.com, and I've followed their instruction as per Live Coin Watch API Documentation
I've created several nodes but I can't get this thing to work.
Of course I've used my actual API key, for the sake of posting I've replaced it with <MY-API>
can you please take a look and tell me what I am doing wrong?
Thank you.
[{"id":"e1db25fcf55f9b7b","type":"inject","z":"f9b5be42.917d48","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":250,"y":1100,"wires":[["9f52a5e5ee9f9186"]]},{"id":"b1472595dc5c674a","type":"debug","z":"f9b5be42.917d48","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":1060,"wires":[]},{"id":"550ad075e2642c7e","type":"ha-api","z":"f9b5be42.917d48","name":"Livecoinwatch with data as headers","server":"20f70dbb.a59b52","version":1,"debugenabled":false,"protocol":"http","method":"post","path":"https://api.livecoinwatch.com/exchanges/list","data":"{\t 'headers': (\t {\t 'content-type': 'application/json',\t 'x-api-key': '<MY-API>'\t }\t ),\t 'body': (\t {\t 'currency': 'USD',\t 'code': 'ETH',\t 'meta': true\t}\t )\t}","dataType":"jsonata","responseType":"json","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"results"}],"x":590,"y":1060,"wires":[["b1472595dc5c674a"]]},{"id":"9f52a5e5ee9f9186","type":"function","z":"f9b5be42.917d48","name":"Send headers + body","func":"msg.headers = {}\nmsg.headers['content-type'] = 'application/json';\nmsg.headers['x-api-key'] = '<MY-API>';\nmsg.body = {};\nmsg.body['currency'] = 'USD';\nmsg.body['code']= 'ETH';\nmsg.body['meta']= true;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":1100,"wires":[["8247c36801658cb2"]]},{"id":"d06e64e2cf268127","type":"inject","z":"f9b5be42.917d48","name":"with headers","props":[{"p":"payload"},{"p":"topic","vt":"str"},{"p":"headers","v":"{\t 'content-type' : \"application/json\",\t 'x-api-key' : \"<MY-API>\"\t}\t","vt":"jsonata"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":270,"y":1060,"wires":[["550ad075e2642c7e"]]},{"id":"3389aa70cc81fae1","type":"ha-api","z":"f9b5be42.917d48","name":"Livecoinwatch with data as headers","server":"20f70dbb.a59b52","version":1,"debugenabled":false,"protocol":"http","method":"post","path":"https://api.livecoinwatch.com/coins/single","data":"{\t 'headers': {\t 'content-type': 'application/json',\t 'x-api-key': '<MY-API>'\t },\t 'body': {\t 'currency': 'ETH',\t 'code': 'gemini',\t 'meta': true\t}\t}","dataType":"jsonata","responseType":"json","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"results"}],"x":590,"y":1020,"wires":[["b1472595dc5c674a"]]},{"id":"654a0f6f659189c5","type":"inject","z":"f9b5be42.917d48","name":"no headers","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":260,"y":1020,"wires":[["3389aa70cc81fae1"]]},{"id":"8247c36801658cb2","type":"ha-api","z":"f9b5be42.917d48","name":"Livecoinwatch no data","server":"20f70dbb.a59b52","version":1,"debugenabled":false,"protocol":"http","method":"post","path":"https://api.livecoinwatch.com/coins/single","data":"{}","dataType":"jsonata","responseType":"json","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"results"}],"x":640,"y":1100,"wires":[["b1472595dc5c674a"]]},{"id":"20f70dbb.a59b52","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]