1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Carpenstar\ByBitAPI\Spot\Trade\BatchCancelOrder\Request; |
4
|
|
|
|
5
|
|
|
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters; |
6
|
|
|
use Carpenstar\ByBitAPI\Spot\Trade\BatchCancelOrder\Interfaces\IBatchCancelOrderRequestInterface; |
7
|
|
|
|
8
|
|
|
class BatchCancelOrderRequest extends AbstractParameters implements IBatchCancelOrderRequestInterface |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* Name of the trading pair |
12
|
|
|
* @var string $symbol |
13
|
|
|
*/ |
14
|
|
|
protected string $symbol; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Side. BUY, SELL |
18
|
|
|
* @var string $side |
19
|
|
|
*/ |
20
|
|
|
protected string $side; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Order type. LIMIT in default. It allows multiple types, separated by comma, e.a LIMIT,LIMIT_MAKER |
24
|
|
|
* @var string $orderTypes |
25
|
|
|
*/ |
26
|
|
|
protected string $orderTypes; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Order category. 0:normal order by default; 1:TP/SL order, Required for TP/SL order. |
30
|
|
|
* @var int $orderCategory |
31
|
|
|
*/ |
32
|
|
|
protected int $orderCategory; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @param string $symbol |
36
|
|
|
* @return BatchCancelOrderRequest |
37
|
|
|
*/ |
38
|
|
|
public function setSymbol(string $symbol): self |
39
|
|
|
{ |
40
|
|
|
$this->symbol = $symbol; |
41
|
|
|
return $this; |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @return string |
46
|
|
|
*/ |
47
|
|
|
public function getSymbol(): string |
48
|
|
|
{ |
49
|
|
|
return $this->symbol; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @param string $side |
54
|
|
|
* @return BatchCancelOrderRequest |
55
|
|
|
*/ |
56
|
|
|
public function setSide(string $side): self |
57
|
|
|
{ |
58
|
|
|
$this->side = $side; |
59
|
|
|
return $this; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @return string |
64
|
|
|
*/ |
65
|
|
|
public function getSide(): string |
66
|
|
|
{ |
67
|
|
|
return $this->side; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @param string $orderTypes |
72
|
|
|
* @return BatchCancelOrderRequest |
73
|
|
|
*/ |
74
|
|
|
public function setOrderTypes(string $orderTypes): self |
75
|
|
|
{ |
76
|
|
|
$this->orderTypes = $orderTypes; |
77
|
|
|
return $this; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @return string |
82
|
|
|
*/ |
83
|
|
|
public function getOrderTypes(): string |
84
|
|
|
{ |
85
|
|
|
return $this->orderTypes; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @param int $orderCategory |
90
|
|
|
* @return BatchCancelOrderRequest |
91
|
|
|
*/ |
92
|
|
|
public function setOrderCategory(int $orderCategory): self |
93
|
|
|
{ |
94
|
|
|
$this->orderCategory = $orderCategory; |
95
|
|
|
return $this; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return int |
100
|
|
|
*/ |
101
|
|
|
public function getOrderCategory(): int |
102
|
|
|
{ |
103
|
|
|
return $this->orderCategory; |
104
|
|
|
} |
105
|
|
|
} |
106
|
|
|
|