The data was too hardcoded imo, causing confusion as well.
There is no such logic at the moment, but nothing stops you from doing 2 more json calls to both DGB and MYR skein.
I think its better, cause you can input your real hashrate for that algo this way.
However I can see that there is no btc_revenue key returned for index, let me add that, so you can calculate profitability yourself for Skein. (Done)
Unfortunately the data is not quite the same either. On the main page, there's "profitability" and "profitability24". This has been replaced by "profit" on the pages for individual coins, which equates to the 24 hour average. Since it's switching based on current difficulty that I'm looking to do, a 24 hour average is of no use to me.
Profitability is just `coin_revenue / dash_revenue`, same for profitability24: `coin_revenue24 / dash_revenue24`.
So all you have to do is call for example:
http://www.whattomine.com/coins/114.json and save value of `difficulty`.
Then calculate revenue with that difficulty:
http://www.whattomine.com/coins/114.json?d=difficulty&hr=hash_rate and save `btc_revenue` as `dgb_skein_revenue`. (remember to push hash_rate in correct units, Mhash in this case)
Now either repeat it for dashcoin:
http://www.whattomine.com/coins/34.json, or get it directly from gpu json
http://www.whattomine.com/coins.json under dash and `btc_revenue` saving as `dash_revenue`.
To receive final profitability to compare with other coins:
`dgb_skein_profitability = (dgb_skein_revenue / dash_revenue) * 100%`