|
...
|
...
|
@@ -73,7 +73,7 @@ class ExBroker |
|
|
|
$subData['op'] = 'subscribe';
|
|
|
|
$subData['args'] = [
|
|
|
|
[
|
|
|
|
'channel' => $this->getKlineChannels()[$period],
|
|
|
|
'channel' => $period,
|
|
|
|
'instId' => $symbol,
|
|
|
|
],
|
|
|
|
];
|
|
...
|
...
|
@@ -178,22 +178,6 @@ class ExBroker |
|
|
|
{
|
|
|
|
return $this->api->placeOrder($param);
|
|
|
|
}
|
|
|
|
public function getKlineChannels()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'1s' => 'candle1s',
|
|
|
|
'1m' => 'candle1m',
|
|
|
|
'5m' => 'candle5m',
|
|
|
|
'15m' => 'candle15m',
|
|
|
|
'30m' => 'candle30m',
|
|
|
|
'1h' => 'candle1H',
|
|
|
|
'2h' => 'candle2H',
|
|
|
|
'4h' => 'candle4H',
|
|
|
|
'6h' => 'candle6H',
|
|
|
|
'12h' => 'candle12H',
|
|
|
|
'1d' => 'candle1D',
|
|
|
|
];
|
|
|
|
}
|
|
|
|
public function getSymbolInfos()
|
|
|
|
{
|
|
|
|
$res = $this->api->instruments(["instType" => "SWAP"]);
|
...
|
...
|
|