You need a source for the data
And then a segment of code to insert as a widget such as the following:
<!-- Start -->
<script type="text/javascript" src="
https://d33t3vvu2t2yu5.cloudfront.net/tv.js"></script>
<script type="text/javascript">
new TradingView.widget({
"width": 980,
"height": 610,
"symbol": "NASDAQ:AAPL",
"interval": "D",
"timezone": "Etc/UTC",
"style": "1",
"locale": "en",
"toolbar_bg": "#f1f3f6",
"enable_publishing": false,
"allow_symbol_change": true,
"hideideas": true
});
</script>
<!-- Finish -->
Note that this code has a javascript source from which it pulls the data. The symbol selection is then requesting specific data from the set provided; in this case NASDAQ:AAPL...
The rest of the code is just adjustments to the view properties of that data; height, width, timezone etc
Looking at the coinmarketcap source code, the source of their data is coming from their own website here:
https://coinmarketcap.com/currencies/bitcoin/#charts They then transform this large chart into a mini chart using some kind of sparkline:
https://en.wikipedia.org/wiki/SparklineThis probably hasnt helped at all, but you need to read up on how to write a small source and inject code; pulling data from coinmarketcap (i do not recommend without written permission) and relaying it to your site.