Commit 8d915681 authored by shajiaiming's avatar shajiaiming

add klg ticker

parent dbac8271
<?php <?php
/**
* Created by PhpStorm.
* User: rlgyzhcn
* Date: 18-6-27
* Time: 下午12:04
*/
namespace common\business; namespace common\business;
...@@ -33,10 +39,9 @@ class ExchangeBusiness ...@@ -33,10 +39,9 @@ class ExchangeBusiness
9 => 'Bitnasdaq', 9 => 'Bitnasdaq',
10 => 'Isummit', 10 => 'Isummit',
11 => 'Boc', 11 => 'Boc',
12 => 'Jinwang', 12 => 'Ztb',
13 => 'Ztb', 13 => 'Wbf',
14 => 'Wbf', 14 => 'Gwa'
15 => 'Gwa'
//1 => 'Hadax', //不需要 //1 => 'Hadax', //不需要
//2 => 'Bitfinex', //不需要 //2 => 'Bitfinex', //不需要
...@@ -51,10 +56,11 @@ class ExchangeBusiness ...@@ -51,10 +56,11 @@ class ExchangeBusiness
//6 => 'Token7',//已挂 //6 => 'Token7',//已挂
//10 => 'Ex',//已挂 //10 => 'Ex',//已挂
//12 => 'Tsc',//已挂 //12 => 'Tsc',//已挂
//13 => 'Jinwang',//已挂
//14 => 'Hd',//已挂
//16 => 'Dag',//已挂 //16 => 'Dag',//已挂
//17 => 'Coinka',//已挂 //17 => 'Coinka',//已挂
//5 => 'Zg',//已挂
//13 => 'Jinwang',//已挂
//14 => 'Hd',//已挂
]; ];
/** /**
...@@ -94,6 +100,139 @@ class ExchangeBusiness ...@@ -94,6 +100,139 @@ class ExchangeBusiness
goto doEnd; goto doEnd;
} }
if (strtoupper($tag) == 'USAT') {
$tag = 'USDT';
}
if (strtoupper($tag) == 'DUSDT') {
$quotation = [
'low' => 6.99,
'high' => 6.99,
'last' => 6.99,
'rmb' => 6.99,
];
goto doEnd;
}
if (strtoupper($tag) == 'YPLUS') {
$quotation = [
'low' => 10,
'high' => 10,
'last' => 10,
'rmb' => 10,
];
goto doEnd;
}
if (strtoupper($tag) == 'BOSS') {
$quotation = [
'low' => 2000,
'high' => 2000,
'last' => 2000,
'rmb' => 2000,
];
goto doEnd;
}
if (strtoupper($tag) == 'CPF') {
$quotation = [
'low' => 3.4,
'high' => 3.4,
'last' => 3.4,
'rmb' => 3.4,
];
goto doEnd;
}
if (strtoupper($tag) == 'FZM') {
$quotation = [
'low' => 40,
'high' => 40,
'last' => 40,
'rmb' => 40,
];
goto doEnd;
}
if (strtoupper($tag) == 'POKE') {
$quotation = [
'low' => 0.1621,
'high' => 0.1621,
'last' => 0.1621,
'rmb' => 0.1621,
];
goto doEnd;
}
if (strtoupper($tag) == 'LHG') {
$quotation = [
'low' => 0.105,
'high' => 0.105,
'last' => 0.105,
'rmb' => 0.105,
];
goto doEnd;
}
if (in_array(strtoupper($tag), ['LZ', 'DTM', 'CNNY'])) {
$quotation = [
'low' => 1,
'high' => 1,
'last' => 1,
'rmb' => 1,
];
goto doEnd;
}
// if (strtoupper($tag) == 'ZUE') {
// $quotation = [
// 'low' => 0.1,
// 'high' => 0.1,
// 'last' => 0.1,
// ];
// goto doEnd;
// }
if (in_array(strtoupper($tag), ['SZHB', 'FK'])) {
$quotation = [
'low' => 0.01,
'high' => 0.01,
'last' => 0.01,
'rmb' => 0.01,
];
goto doEnd;
}
if (in_array(strtoupper($tag), ['GST', 'JNTK', 'SPT', 'STO', 'GM', 'BSTC', 'RYH', 'CNDT', 'WL', 'ETS', 'LIMS', 'AT', 'BTJ', 'WXB', 'GFCC', 'TNT'])) {
$quotation = [
'low' => 0,
'high' => 0,
'last' => 0,
'rmb' => 0,
];
goto doEnd;
}
if (in_array($tag, $coin_quotation_disable_items)) {
return false;
}
$f = false;
$quotation = [];
if (in_array(strtoupper($tag), ['LELE', 'ZUE'])) {
if (strtoupper($tag) == 'LELE') {
$exchange = ExchangeFactory::createExchange("Wbf");
$quotation = $exchange->getTicker($tag, 'USDT');
}
if (strtoupper($tag) == 'ZUE') {
$quotation = [
'low' => 0.1,
'high' => 0.1,
'last' => 0.1,
];
}
goto doEnd;
}
if (in_array(strtoupper($tag), ['GLCW'])) { if (in_array(strtoupper($tag), ['GLCW'])) {
$exchange = ExchangeFactory::createExchange("Jinwang"); $exchange = ExchangeFactory::createExchange("Jinwang");
$quotation = $exchange->getTicker($tag, 'USDT'); $quotation = $exchange->getTicker($tag, 'USDT');
...@@ -303,7 +442,7 @@ class ExchangeBusiness ...@@ -303,7 +442,7 @@ class ExchangeBusiness
goto doEnd; goto doEnd;
} }
if (in_array(strtoupper($tag), ['GWA', 'KLG'])) { if (in_array(strtoupper($tag), ['GWA','KLG'])) {
$exchange = ExchangeFactory::createExchange("Gwa"); $exchange = ExchangeFactory::createExchange("Gwa");
$quotation = $exchange->getTicker(strtoupper($tag), 'USDT'); $quotation = $exchange->getTicker(strtoupper($tag), 'USDT');
goto doEnd; 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