作者 karlet

feat:copy同步设置host

... ... @@ -68,7 +68,8 @@ class CmBroker
public $uid;
public $posMode = '';
public ?ApiInfo $apiInfo;
private $wsHost;
private $restHost;
public function __construct($plat, ?ApiInfo $apiInfo, $wsHost = null, $restHost = null)
{
... ... @@ -87,6 +88,8 @@ class CmBroker
if ($plat == self::PLAT_BITGET) {
$exBroker = new BitgetBroker($apiInfo);
}
$this->wsHost = $wsHost;
$this->restHost = $restHost;
$this->exBroker = $exBroker;
if ($wsHost && $wsHost != "") {
$this->exBroker->setWsHost($wsHost);
... ... @@ -103,7 +106,7 @@ class CmBroker
if ($this->apiInfo) {
$apiInfo = new ApiInfo($this->apiInfo->key, $this->apiInfo->secret, $this->apiInfo->passphrase);
}
$cmBroker = new CmBroker($this->plat, $apiInfo);
$cmBroker = new CmBroker($this->plat, $apiInfo, $this->wsHost, $this->restHost);
$cmBroker->symbolInfos = $this->symbolInfos;
$cmBroker->positions = $this->positions;
$cmBroker->name = $this->name;
... ...