From 945ad8d2be8e63da1c60909ea7563f0c4fc5cba0 Mon Sep 17 00:00:00 2001 From: Joshua Seigler Date: Fri, 3 Feb 2017 10:01:28 -0500 Subject: [PATCH] feat: update examples, finish USDT support --- views/chart.php | 2 +- views/index.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/views/chart.php b/views/chart.php index 09c05f8..89bb7a7 100644 --- a/views/chart.php +++ b/views/chart.php @@ -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; } diff --git a/views/index.php b/views/index.php index 6ff4323..b3ef275 100644 --- a/views/index.php +++ b/views/index.php @@ -72,19 +72,19 @@

Transparent SVG and PNG charts with your favorite cryptocurrencies

- Poloniex Dash/BTC price -
7 day Dash price candlesticks in BTC https://cryptohistory.org/charts/candlestick/dash-btc/7d/svg
+ Poloniex Dash/BTC price +
7 day Dash price candlesticks in USDT (Tether USD) https://cryptohistory.org/charts/candlestick/dash-usdt/7d/svg
-

Sparklines too! ETH 7 days: ETH 7d chart - <img src="https://cryptohistory.org/charts/sparkline/eth-btc/7d/svg" alt="ETH 7d chart" style="vertical-align: bottom;"> +

Sparklines too! ETH/BTC 7 days: ETH 7d chart + <img src="https://cryptohistory.org/charts/sparkline/eth-btc/7d/svg" alt="ETH/BTC 7d chart" style="vertical-align: bottom;">

Build your own chart:

The URL is flexible:
- https://cryptohistory.org/charts/{theme}/{currency}-btc/{timespan}/{format}

+ https://cryptohistory.org/charts/{theme}/{currency}-{btc|usdt}/{timespan}/{format}

Theme: dark, light, or sparkline.

-

Currency: anything active on Poloniex. Prices are all in bitcoin.

+

Currency: anything active on Poloniex. Supports prices in Bitcoin or Tether USD.

Timespan: 1y, 30d, 7d, or 24h.

Format: svg (best) or png.

If you use svg format, you can control some of the colors with GET parameters: lineColor, markerColor, risingColor, fallingColor. Some examples: https://cryptohistory.com/charts/dark/maid-btc/7d/svg?lineColor=5593D7&markerColor=29578A https://cryptohistory.org/charts/candlestick/fct-btc/7d/svg?risingColor=FE8534&fallingColor=00BAE9