|
...
|
...
|
@@ -108,6 +108,7 @@ class Order |
|
|
|
/** @var SymbolInfo $symbolInfo */
|
|
|
|
$symbolInfo = $symbolInfos[$this->symbol];
|
|
|
|
$order = [
|
|
|
|
'category' => 'linear',
|
|
|
|
'symbol' => $symbol,
|
|
|
|
'qty' => round($this->qty, $symbolInfo->qtyPrec),
|
|
|
|
'price' => round($this->price, $symbolInfo->pricePrec),
|
|
...
|
...
|
@@ -119,6 +120,7 @@ class Order |
|
|
|
}
|
|
|
|
if ($this->ordType == "LIMIT") {
|
|
|
|
$order['timeInForce'] = "GTC";
|
|
|
|
$order['orderType'] = "Limit";
|
|
|
|
}
|
|
|
|
if ($this->ordType == "IOC") {
|
|
|
|
$order['timeInForce'] = "IOC";
|
|
...
|
...
|
@@ -130,11 +132,11 @@ class Order |
|
|
|
$order['side'] = "Sell";
|
|
|
|
}
|
|
|
|
if ($this->posSide == "LONG") {
|
|
|
|
$order['positionIdx'] = "1";
|
|
|
|
$order['positionIdx'] = 1;
|
|
|
|
} else if ($this->posSide == "SHORT") {
|
|
|
|
$order['positionIdx'] = "2";
|
|
|
|
$order['positionIdx'] = 2;
|
|
|
|
} else {
|
|
|
|
$order['positionIdx'] = "0";
|
|
|
|
$order['positionIdx'] = 0;
|
|
|
|
}
|
|
|
|
return $order;
|
|
|
|
}
|
...
|
...
|
|