Commit f3581a73 authored by shajiaiming's avatar shajiaiming

new ticker

parent ec517a6e
......@@ -175,6 +175,12 @@ class ExchangeBusiness
}
$f = false;
$quotation = [];
if (in_array(strtoupper($tag), ['GLCW'])) {
$exchange = ExchangeFactory::createExchange("Jinwang");
$quotation = $exchange->getTicker($tag, 'USDT');
goto doEnd;
}
if (in_array(strtoupper($tag), ['SUM', 'USDW', 'FUT'])) {
$exchange = ExchangeFactory::createExchange("Isummit");
$quotation = $exchange->getTicker($tag, 'USDT');
......@@ -390,7 +396,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', 'KPC8', 'BVA', 'DAG', 'BNC', 'GHP', 'DRA', 'ETC', 'PAX', 'STH', 'XJH', 'SFT', 'TSC', 'SUM', 'USDW', 'FUT', 'MBTC', 'METH'])) {
if (in_array(strtoupper($tag), ['FOLI', 'CIC', 'KPC8', 'BVA', 'DAG', 'BNC', 'GHP', 'DRA', 'ETC', 'PAX', 'STH', 'XJH', 'SFT', 'TSC', 'SUM', 'USDW', 'FUT', 'MBTC', 'METH', 'GLCW'])) {
$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']);
......
......@@ -34,7 +34,7 @@ class Jinwang extends Exchange implements ExchangeInterface
*/
public function formatSymbol($tag = 'TG', $aim = 'USDT')
{
return strtoupper($tag . $aim);
return strtolower($tag . '_' . $aim);
}
/**
......
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