mirror of
https://github.com/seigler/cryptohistory.org
synced 2025-07-27 01:36:11 +00:00
feat: update examples, finish USDT support
This commit is contained in:
parent
c05de815f4
commit
945ad8d2be
2 changed files with 7 additions and 7 deletions
|
@ -135,7 +135,7 @@ function renderChart(
|
|||
}
|
||||
CacheManager::set('poloniex-supported-currencies', $supportedCurrencies, 60 * 60 * 24 * 7); // asking once a week doesn't seem like too much
|
||||
}
|
||||
if ($currencyB != 'btc' || !in_array($currencyA, $supportedCurrencies)) {
|
||||
if (!in_array($currencyB, ['btc', 'usdt']) || !in_array($currencyA, $supportedCurrencies)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,19 +72,19 @@
|
|||
<section>
|
||||
<h2>Transparent SVG and PNG charts with your favorite cryptocurrencies</h2>
|
||||
<figure>
|
||||
<img src="/charts/candlestick/dash-btc/7d/svg" alt="Poloniex Dash/BTC price">
|
||||
<figcaption>7 day Dash price candlesticks in BTC <code><a href="/charts/candlestick/dash-btc/7d/svg">https://cryptohistory.org/charts/candlestick/dash-btc/7d/svg</a></code></figcaption>
|
||||
<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>
|
||||
</figure>
|
||||
<p>Sparklines too! ETH 7 days: <img src="/charts/sparkline/eth-btc/7d/svg" alt="ETH 7d chart" style="vertical-align: bottom;">
|
||||
<code><img src="https://cryptohistory.org/charts/sparkline/eth-btc/7d/svg" alt="ETH 7d chart" style="vertical-align: bottom;"></code>
|
||||
<p>Sparklines too! ETH/BTC 7 days: <img src="/charts/sparkline/eth-btc/7d/svg" alt="ETH 7d chart" style="vertical-align: bottom;">
|
||||
<code><img src="https://cryptohistory.org/charts/sparkline/eth-btc/7d/svg" alt="ETH/BTC 7d chart" style="vertical-align: bottom;"></code>
|
||||
</p>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Build your own chart:</h2>
|
||||
<p>The URL is flexible:<br>
|
||||
<code>https://cryptohistory.org/charts/{theme}/{currency}-btc/{timespan}/{format}</code></p>
|
||||
<code>https://cryptohistory.org/charts/{theme}/{currency}-{btc|usdt}/{timespan}/{format}</code></p>
|
||||
<p>Theme: <code>dark</code>, <code>light</code>, or <code>sparkline</code>.</p>
|
||||
<p>Currency: anything active on Poloniex. Prices are all in bitcoin.</p>
|
||||
<p>Currency: anything active on Poloniex. Supports prices in Bitcoin or Tether USD.</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&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&fallingColor=00BAE9</a></code>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue