|
...
|
...
|
@@ -155,9 +155,18 @@ class CmBroker |
|
|
|
}
|
|
|
|
public function klineListen($symbol, $peroid, $onData)
|
|
|
|
{
|
|
|
|
if ($this->plat == self::PLAT_BINANCE && $peroid == '1s') {
|
|
|
|
$this->msg("币安不支持1sk线", $symbol, $peroid);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
$symbol = $this->getSymbolOri($symbol, $this->plat);
|
|
|
|
$this->exBroker->klineListen($symbol, $peroid, function ($data) use ($onData) {
|
|
|
|
$kline = Kline::transferOkx($data);
|
|
|
|
if ($this->plat == self::PLAT_BINANCE) {
|
|
|
|
$kline = Kline::transferBinance($data);
|
|
|
|
}
|
|
|
|
if ($this->plat == self::PLAT_OKX) {
|
|
|
|
$kline = Kline::transferOkx($data);
|
|
|
|
}
|
|
|
|
$onData($kline);
|
|
|
|
});
|
|
|
|
}
|
...
|
...
|
|