正在显示
1 个修改的文件
包含
5 行增加
和
2 行删除
| @@ -68,7 +68,8 @@ class CmBroker | @@ -68,7 +68,8 @@ class CmBroker | ||
| 68 | public $uid; | 68 | public $uid; |
| 69 | public $posMode = ''; | 69 | public $posMode = ''; |
| 70 | public ?ApiInfo $apiInfo; | 70 | public ?ApiInfo $apiInfo; |
| 71 | - | 71 | + private $wsHost; |
| 72 | + private $restHost; | ||
| 72 | 73 | ||
| 73 | public function __construct($plat, ?ApiInfo $apiInfo, $wsHost = null, $restHost = null) | 74 | public function __construct($plat, ?ApiInfo $apiInfo, $wsHost = null, $restHost = null) |
| 74 | { | 75 | { |
| @@ -87,6 +88,8 @@ class CmBroker | @@ -87,6 +88,8 @@ class CmBroker | ||
| 87 | if ($plat == self::PLAT_BITGET) { | 88 | if ($plat == self::PLAT_BITGET) { |
| 88 | $exBroker = new BitgetBroker($apiInfo); | 89 | $exBroker = new BitgetBroker($apiInfo); |
| 89 | } | 90 | } |
| 91 | + $this->wsHost = $wsHost; | ||
| 92 | + $this->restHost = $restHost; | ||
| 90 | $this->exBroker = $exBroker; | 93 | $this->exBroker = $exBroker; |
| 91 | if ($wsHost && $wsHost != "") { | 94 | if ($wsHost && $wsHost != "") { |
| 92 | $this->exBroker->setWsHost($wsHost); | 95 | $this->exBroker->setWsHost($wsHost); |
| @@ -103,7 +106,7 @@ class CmBroker | @@ -103,7 +106,7 @@ class CmBroker | ||
| 103 | if ($this->apiInfo) { | 106 | if ($this->apiInfo) { |
| 104 | $apiInfo = new ApiInfo($this->apiInfo->key, $this->apiInfo->secret, $this->apiInfo->passphrase); | 107 | $apiInfo = new ApiInfo($this->apiInfo->key, $this->apiInfo->secret, $this->apiInfo->passphrase); |
| 105 | } | 108 | } |
| 106 | - $cmBroker = new CmBroker($this->plat, $apiInfo); | 109 | + $cmBroker = new CmBroker($this->plat, $apiInfo, $this->wsHost, $this->restHost); |
| 107 | $cmBroker->symbolInfos = $this->symbolInfos; | 110 | $cmBroker->symbolInfos = $this->symbolInfos; |
| 108 | $cmBroker->positions = $this->positions; | 111 | $cmBroker->positions = $this->positions; |
| 109 | $cmBroker->name = $this->name; | 112 | $cmBroker->name = $this->name; |
-
请 注册 或 登录 后发表评论