Commit 08e27955 authored by shajiaiming's avatar shajiaiming

mc ticker

parent 86f8fc32
......@@ -311,7 +311,7 @@ class ExchangeBusiness
goto doEnd;
}
if (in_array(strtoupper($tag), ['CIC', 'ZYC'])) {
if (in_array(strtoupper($tag), ['CIC', 'ZYC', 'MC'])) {
$exchange = ExchangeFactory::createExchange("Ztb");
$quotation = $exchange->getTicker(strtoupper($tag), 'USDT');
goto doEnd;
......@@ -460,7 +460,7 @@ class ExchangeBusiness
$exchange = ExchangeFactory::createExchange("Go");
$rate = $exchange->getTicker("CNY", "USD");
$cny_usd_rate = 1 / $rate['last'];
if (in_array(strtoupper($tag), ['FOLI', 'CIC', 'ZYC', 'KPC8', 'BVA', 'DAG', 'BNC', 'GHP', 'DRA', 'ETC', 'PAX', 'STH', 'XJH', 'SFT', 'TSC', 'SUM', 'USDW', 'FUT', 'MBTC', 'METH', 'GLCW', 'HDC', 'LELE', 'ZUE'])) {
if (in_array(strtoupper($tag), ['FOLI', 'CIC', 'ZYC', 'MC', 'KPC8', 'BVA', 'DAG', 'BNC', 'GHP', 'DRA', 'ETC', 'PAX', 'STH', 'XJH', 'SFT', 'TSC', 'SUM', 'USDW', 'FUT', 'MBTC', 'METH', 'GLCW', 'HDC', 'LELE', 'ZUE'])) {
$quotation['usd'] = (float)sprintf("%0.4f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last'] / $cny_usd_rate);
$quotation['low'] = (float)sprintf("%0.4f", $quotation['low']);
......
......@@ -61,7 +61,7 @@ class Ztb extends Exchange implements ExchangeInterface
if (is_array($content) && isset($content['ticker'])) {
$data = $content['ticker'];
foreach ($data as $item) {
if (in_array($item['symbol'], ['ZYC_USDT'])) {
if (in_array($item['symbol'], ['ZYC_USDT','MC_USDT'])) {
$data = $item;
$key = $this->quotation_prefix . str_replace('_', '', $item['symbol']);
$this->redis->hmset($key, 'low', $data['low'], 'high', $data['high'], 'last', $data['last'], 'vol', $data['vol'], 'change', $data['change']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment