Sample data from Bitcoin Dominance Chart on Coin Market Cap.

Bitcoin dominance chart

CoinmarketCap has some global charts.You can find them on I was particularly interested in the dominance chart.

Recently when I was trying to do sampling from the above Graph for an article it was taking a lot of time and irritating. While using MAC split screen in it was not easy to switch the focus between the split screens (Comment if you know how to do it.). So I set out to write a small script to fetch the data. Though the script took a little longer than I expected, I think I will save a lot of time going forward whenever I want to do sampling. I am putting out the script so that others also can use it.

You can checkout the gist on

Looks like gists are not generating the embed properly for me. So I putting up the code as well.

dominanceChart = Highcharts.charts[2];
coinsForDominance = ['Bitcoin','Ethereum','Bitcoin Cash', 'Ripple', 'Others'];
datesForDominance = ['Jan 25 2017', 'March 10 2017', 'March 26 2017', 'May 18 2017', 'June 14 2017', 'August 03 2017', 'November 12 2017', 'Dec 8 2017', 'Jan 14 2018', 'May 3 2018'];
coinDateDominanceMatrix = [];
coinsForDominanceData = dominanceChart.series.filter(coin => {return coinsForDominance.indexOf( != -1});
csvString = "Date, " + coinsForDominance.join();
firstDateTime = coinsForDominanceData[0].xData[0];
date = new Date(1485242220000);
difference = firstDateTime - date.getTime();

csvString+= "n" + relevantDate + ", ";
coinDateDominanceMatrix[relevantDate] = [];
timestring = Date.parse(relevantDate)+difference;
coinDominance = coin.yData[coin.xData.indexOf(timestring)];
var dominanceValue = Math.round(coinDominance * 100) / 100;
coinDateDominanceMatrix[relevantDate][]= dominanceValue;
csvString+=dominanceValue + ", ";

Just visit the page and copy paste the following code into console to get the relevant data. You can also edit “`coinsForDominance“` and “`datesForDominance“` variables to get the data that you need.

Let me know if it helped you.

read original article here