Change data API from Poloniex to CryptoCompare.com

This commit is contained in:
Joshua Seigler 2018-02-15 16:06:30 -05:00
parent a6784a0240
commit 5ebec31d80
3 changed files with 93 additions and 79 deletions

View file

@ -72,8 +72,8 @@
<section>
<h2>Transparent SVG and PNG charts with your favorite cryptocurrencies</h2>
<figure>
<img src="/charts/candlestick/dash-usdt/7d/svg" alt="Poloniex Dash/BTC price">
<figcaption>7 day Dash price candlesticks in USDT (Tether USD) <code><a href="/charts/candlestick/dash-usdt/7d/svg">https://cryptohistory.org/charts/candlestick/dash-usdt/7d/svg</a></code></figcaption>
<img src="/charts/candlestick/dash-usd/7d/svg" alt="Dash/USD price">
<figcaption>7 day Dash price candlesticks in USD <code><a href="/charts/candlestick/dash-usdt/7d/svg">https://cryptohistory.org/charts/candlestick/dash-usd/7d/svg</a></code></figcaption>
</figure>
<p>Sparklines too! ETH/BTC 7 days: <img src="/charts/sparkline/eth-btc/7d/svg" alt="ETH 7d chart" style="vertical-align: bottom;">
<code>&lt;img src=&quot;https://cryptohistory.org/charts/sparkline/eth-btc/7d/svg&quot; alt=&quot;ETH/BTC 7d chart&quot; style=&quot;vertical-align: bottom;&quot;&gt;</code>
@ -82,9 +82,9 @@
<section>
<h2>Build your own chart:</h2>
<p>The URL is flexible:<br>
<code>https://cryptohistory.org/charts/{theme}/{currency}-{btc|usdt}/{timespan}/{format}</code></p>
<code>https://cryptohistory.org/charts/{theme}/{currencyA}-{currencyB}/{timespan}/{format}</code></p>
<p>Theme: <code>dark</code>, <code>light</code>, or <code>sparkline</code>.</p>
<p>Currency: anything active on Poloniex. Supports prices in Bitcoin or Tether USD.</p>
<p>Currency: anything supported by CryptoCompare.com, including fiat.</p>
<p>Timespan: <code>1y</code>, <code>30d</code>, <code>7d</code>, or <code>24h</code>.</p>
<p>Format: <code>svg</code> (best) or <code>png</code>.</p>
<p>If you use svg format, you can control some of the colors with GET parameters: <code>lineColor</code>, <code>markerColor</code>, <code>risingColor</code>, <code>fallingColor</code>. Some examples: <code><a href="/charts/dark/maid-btc/7d/svg?lineColor=5593D7&markerColor=29578A">https://cryptohistory.com/charts/dark/maid-btc/7d/svg?lineColor=5593D7&amp;markerColor=29578A</a></code> <code><a href="/charts/candlestick/fct-btc/7d/svg?risingColor=FE8534&fallingColor=00BAE9">https://cryptohistory.org/charts/candlestick/fct-btc/7d/svg?risingColor=FE8534&amp;fallingColor=00BAE9</a></code>
@ -92,13 +92,13 @@
</section>
<section>
<h2>Examples:</h2>
<p>Ethereum 24h, dark SVG: <code><a href="/charts/dark/eth-btc/24h/svg" target="_blank">https://cryptohistory.org/charts/dark/eth-btc/24h/svg</a></code></p>
<p>Litecoin 30d, light PNG: <code><a href="/charts/light/ltc-btc/30d/png" target="_blank">https://cryptohistory.org/charts/light/ltc-btc/30d/png</a></code></p>
<p>Doge 1y, dark SVG, yellow line: <code><a href="/charts/dark/doge-btc/1y/svg?lineColor=BB9F32" target="_blank">https://cryptohistory.org/charts/dark/doge-btc/1y/svg?lineColor=BB9F32</a></code></p>
<p>Ethereum/Bitcoin 24h, dark SVG: <code><a href="/charts/dark/eth-btc/24h/svg" target="_blank">https://cryptohistory.org/charts/dark/eth-btc/24h/svg</a></code></p>
<p>Litecoin/Bitcoin 30d, light PNG: <code><a href="/charts/light/ltc-btc/30d/png" target="_blank">https://cryptohistory.org/charts/light/ltc-btc/30d/png</a></code></p>
<p>Doge/USD 1y, dark SVG, yellow line: <code><a href="/charts/dark/doge-usd/1y/svg?lineColor=BB9F32" target="_blank">https://cryptohistory.org/charts/dark/doge-usd/1y/svg?lineColor=BB9F32</a></code></p>
</section>
</main>
<footer>
Made by <a href="https://joshua.seigler.net/">Joshua Seigler</a> using <a href="https://github.com/seigler/neat-charts">seigler/neat-charts</a>, <a href="http://altorouter.com/">AltoRouter</a>, and <a href="http://www.phpfastcache.com/">phpfastcache</a> with data from the <a href="https://poloniex.com/support/api/">Poloniex public API</a>.
Made by <a href="https://joshua.seigler.net/">Joshua Seigler</a> using <a href="https://github.com/seigler/neat-charts">seigler/neat-charts</a>, <a href="http://altorouter.com/">AltoRouter</a>, and <a href="http://www.phpfastcache.com/">phpfastcache</a> with data from the <a href="https://www.cryptocompare.com/api/">CryptoCompare public API</a>.
</footer>
</body>
</html>