Great Job Craig. Thank you so much. It was exactly what I was looking for. But one small problem When i insert the data for Dodge Coin the card is showing XRP symbol. Does somebody have the same problem or is it just me?
Sorry, I must have missed your message a couple of days ago.
Looking at the constant unknown values your having - im going to suggest that maybe you have more than one template sensor connecting to the nomics API? You are limited to 1 call per second with Nomics.
This is why I call the data for all the coins I access in one template.
Have you made multiple rest sensors? You should only have one connection to the resource. So you code shouold be something like the below, with the sensors set up from just one rest call.
I pull both DOGE and XRP and they both work fine so im guessing as youve figured out it was something your end
You do need to call all the coins in the same rest sensor and then split them out to seperate sensors though, which can be problematic as you can only sort by market cap or the time they were first listed on nomics.
Sorting by market cap isnt ideal for anyone wanting info from various coins as it can change. So you would think sorting by the time first listed would solve this issue - however nomics only listed a load of coins last year so it falls back to sorting by market cap. Therefore, i do sometimes get my XRP and DOGE coin sensors interchange due to them having similar caps
From the guys at nomics they told me
We started tracking the first price date about a year ago and before that we don't have data, so since you're asking about a bunch of older coins here they actually all have the same start date when we started tracking things. So then they fall back to rank sort.
I dont really understand why they therefore wont allow you to filter by first trade, first candle or first order book as they do store all this info in their API and the info is correct. I did ask if they would add any of these as potential filters but the answer was no
This is such a cool integration, but I am having trouble with the sort order. I managed to figure out how to get the attributes path (regardless of order) as follows. Does anyone know if the value_json can also use a JSONPath instead of the index? I cannot use the index because the sort order could change.
For those trying to deal with the sort order issue, I am posting the solution here. Simply duplicate the code below for each coin you want to track, then replace RTM with the desired crypto coin (e.g. ETH).
Perfect solution and works, however a quick heads up that if you used the original post you canāt do a straight drop in.
In the original post the sensors were named Crypto - [coin] - 1 D
In the above solution theyāre called Crypto - [coin] - 1 Day
(same for 7 and 30 days)
Took me ages to spot this and work out why my views in Lovelace has stopped rendering. Thanks for the solution @ultrajones
Had a great day having found this thread and updated my previous solution for crypto tracking to use this. - thanks to all who have contributed and of course the original post!! This then led me to having a good play with the lovelace example provided which Iāve tweaked (cos thatās what you do in HomeAssistant) and come out with a slightly different take on an already excellent example:
Played around the monetary and percentage fields to fix them as currency (where required) and also to carry 2 decimals. Added a range selector for the graph which is now rendered in Apex Charts and also changed the styling of the movement data.
First of all thanks @Craig_McGowan for sharing this, I was going to use another solution using coingecko but found this one to be more easy to implement but I must say that I had a bad surprise when after my first month I got a bill for $420 so I must clearly be doing something wrong.
I followed up the details provided by @Craig_McGowan but must have definitively missed something.
Did I get this wrong that this would be free if under a certain data consomption?
Hereās my rest sensor setup, can anyone help me spot what the issue is please, I love this integration but +$400/month is not coing to cut it.
Iām not sure how you have ended up being charged for anything.
The API is free for personal use
Did you sign up for a commercial API or something? Iāve never entered any card details to allow for a payment to be taken either so unsure what you have done?
Just thought Iād give an update after speaking to Nomics, I explained the situation to them and they advise me on how to proceed to cancel the subscription to the paid api and recreate an account for the free api so all sorted now.
Have a great day everyone and again thanks @Craig_McGowan for sharing this.
Sorry, Iāve since decommissioned those dashboards and removed this from HA (turned out I never looked at it in home assistant so it seemed pointless having in there!)