作者 karlet

feat:修改下单问题

@@ -108,6 +108,7 @@ class Order @@ -108,6 +108,7 @@ class Order
108 /** @var SymbolInfo $symbolInfo */ 108 /** @var SymbolInfo $symbolInfo */
109 $symbolInfo = $symbolInfos[$this->symbol]; 109 $symbolInfo = $symbolInfos[$this->symbol];
110 $order = [ 110 $order = [
  111 + 'category' => 'linear',
111 'symbol' => $symbol, 112 'symbol' => $symbol,
112 'qty' => round($this->qty, $symbolInfo->qtyPrec), 113 'qty' => round($this->qty, $symbolInfo->qtyPrec),
113 'price' => round($this->price, $symbolInfo->pricePrec), 114 'price' => round($this->price, $symbolInfo->pricePrec),
@@ -119,6 +120,7 @@ class Order @@ -119,6 +120,7 @@ class Order
119 } 120 }
120 if ($this->ordType == "LIMIT") { 121 if ($this->ordType == "LIMIT") {
121 $order['timeInForce'] = "GTC"; 122 $order['timeInForce'] = "GTC";
  123 + $order['orderType'] = "Limit";
122 } 124 }
123 if ($this->ordType == "IOC") { 125 if ($this->ordType == "IOC") {
124 $order['timeInForce'] = "IOC"; 126 $order['timeInForce'] = "IOC";
@@ -130,11 +132,11 @@ class Order @@ -130,11 +132,11 @@ class Order
130 $order['side'] = "Sell"; 132 $order['side'] = "Sell";
131 } 133 }
132 if ($this->posSide == "LONG") { 134 if ($this->posSide == "LONG") {
133 - $order['positionIdx'] = "1"; 135 + $order['positionIdx'] = 1;
134 } else if ($this->posSide == "SHORT") { 136 } else if ($this->posSide == "SHORT") {
135 - $order['positionIdx'] = "2"; 137 + $order['positionIdx'] = 2;
136 } else { 138 } else {
137 - $order['positionIdx'] = "0"; 139 + $order['positionIdx'] = 0;
138 } 140 }
139 return $order; 141 return $order;
140 } 142 }