Commit cb73a4ed authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/ticker' into 'master'

foli行情 See merge request !75
parents 45a6c1d6 5de0d4d1
......@@ -101,49 +101,49 @@ class ExchangeBusiness
if (in_array(strtoupper($tag), ['FOLI'])) {
$exchange = ExchangeFactory::createExchange("Ex");
$quotation = $exchange->getTicker($tag, 'USDT');
$quotation['rmb'] = (float)sprintf("%0.2f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
goto doEnd;
}
if (in_array(strtoupper($tag), ['GM', 'BSTC'])) {
$exchange = ExchangeFactory::createExchange("Token7");
$quotation = $exchange->getTicker($tag, 'HA');
$quotation['rmb'] = (float)sprintf("%0.2f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
goto doEnd;
}
if (in_array(strtoupper($tag), ['BECC'])) {
$exchange = ExchangeFactory::createExchange("S");
$quotation = $exchange->getTicker($tag, 'ST');
$quotation['rmb'] = (float)sprintf("%0.2f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
goto doEnd;
}
if (in_array(strtoupper($tag), ['GHP'])) {
$exchange = ExchangeFactory::createExchange("Zg");
$quotation = $exchange->getTicker($tag, 'CNZ');
$quotation['rmb'] = (float)sprintf("%0.2f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
goto doEnd;
}
if (in_array(strtoupper($tag), ['SFT'])) {
$exchange = ExchangeFactory::createExchange("Zhaobi");
$quotation = $exchange->getTicker($tag, 'CNY');
$quotation['rmb'] = (float)sprintf("%0.2f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
goto doEnd;
}
if (in_array(strtoupper($tag), ['CTG'])) {
$exchange = ExchangeFactory::createExchange("Gdpro");
$quotation = $exchange->getTicker($tag, 'CNY');
$quotation['rmb'] = (float)sprintf("%0.2f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
goto doEnd;
}
if (in_array(strtoupper($tag), ['USDT'])) {
$exchange = ExchangeFactory::createExchange("Go");
$quotation = $exchange->getTicker('CNY', 'USD');
$quotation['rmb'] = (float)sprintf("%0.2f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
goto doEnd;
}
......
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