1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Carpenstar\ByBitAPI\Derivatives\Contract\Order\GetOpenOrders\Request; |
4
|
|
|
|
5
|
|
|
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters; |
6
|
|
|
use Carpenstar\ByBitAPI\Derivatives\Contract\Order\GetOpenOrders\Interfaces\IGetOpenOrdersRequestInterface; |
7
|
|
|
|
8
|
|
|
class GetOpenOrdersRequest extends AbstractParameters implements IGetOpenOrdersRequestInterface |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* Symbol name |
12
|
|
|
* @var string $symbol |
13
|
|
|
*/ |
14
|
|
|
protected string $symbol; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Base coin |
18
|
|
|
* @var string $baseCoin |
19
|
|
|
*/ |
20
|
|
|
protected string $baseCoin; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Settle coin. One of symbol,baseCoin and settleCoin is required. Priority: symbol > baseCoin > settleCoin |
24
|
|
|
* @var string $settleCoin |
25
|
|
|
*/ |
26
|
|
|
protected string $settleCoin; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Order id |
30
|
|
|
* @var string $orderId |
31
|
|
|
*/ |
32
|
|
|
protected string $orderId; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* User customised order id |
36
|
|
|
* @var string $orderLinkId |
37
|
|
|
*/ |
38
|
|
|
protected string $orderLinkId; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Order: active order, StopOrder: conditional order |
42
|
|
|
* @var string $orderFilter |
43
|
|
|
*/ |
44
|
|
|
protected string $orderFilter; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* Limit for data size per page. [1, 50]. Default: 20 |
48
|
|
|
* @var int $limit |
49
|
|
|
*/ |
50
|
|
|
protected int $limit = 20; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* Cursor. Use the nextPageCursor token from the response to retrieve the next page of the result set |
54
|
|
|
* @var string $cursor |
55
|
|
|
*/ |
56
|
|
|
protected string $cursor; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @return string |
60
|
|
|
*/ |
61
|
|
|
public function getSymbol(): string |
62
|
|
|
{ |
63
|
|
|
return $this->symbol; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @param string $symbol |
68
|
|
|
* @return GetOpenOrdersRequest |
69
|
|
|
*/ |
70
|
|
|
public function setSymbol(string $symbol): self |
71
|
|
|
{ |
72
|
|
|
$this->symbol = $symbol; |
73
|
|
|
return $this; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @return string |
78
|
|
|
*/ |
79
|
|
|
public function getBaseCoin(): string |
80
|
|
|
{ |
81
|
|
|
return $this->baseCoin; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @param string $baseCoin |
86
|
|
|
* @return GetOpenOrdersRequest |
87
|
|
|
*/ |
88
|
|
|
public function setBaseCoin(string $baseCoin): self |
89
|
|
|
{ |
90
|
|
|
$this->baseCoin = $baseCoin; |
91
|
|
|
return $this; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @return string |
96
|
|
|
*/ |
97
|
|
|
public function getSettleCoin(): string |
98
|
|
|
{ |
99
|
|
|
return $this->settleCoin; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @param string $settleCoin |
104
|
|
|
* @return GetOpenOrdersRequest |
105
|
|
|
*/ |
106
|
|
|
public function setSettleCoin(string $settleCoin): self |
107
|
|
|
{ |
108
|
|
|
$this->settleCoin = $settleCoin; |
109
|
|
|
return $this; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @return string |
114
|
|
|
*/ |
115
|
|
|
public function getOrderId(): string |
116
|
|
|
{ |
117
|
|
|
return $this->orderId; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @param string $orderId |
122
|
|
|
* @return GetOpenOrdersRequest |
123
|
|
|
*/ |
124
|
|
|
public function setOrderId(string $orderId): self |
125
|
|
|
{ |
126
|
|
|
$this->orderId = $orderId; |
127
|
|
|
return $this; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* @return string |
132
|
|
|
*/ |
133
|
|
|
public function getOrderLinkId(): string |
134
|
|
|
{ |
135
|
|
|
return $this->orderLinkId; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @param string $orderLinkId |
140
|
|
|
* @return GetOpenOrdersRequest |
141
|
|
|
*/ |
142
|
|
|
public function setOrderLinkId(string $orderLinkId): self |
143
|
|
|
{ |
144
|
|
|
$this->orderLinkId = $orderLinkId; |
145
|
|
|
return $this; |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
/** |
149
|
|
|
* @return string |
150
|
|
|
*/ |
151
|
|
|
public function getOrderFilter(): string |
152
|
|
|
{ |
153
|
|
|
return $this->orderFilter; |
154
|
|
|
} |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* @param string $orderFilter |
158
|
|
|
* @return GetOpenOrdersRequest |
159
|
|
|
*/ |
160
|
|
|
public function setOrderFilter(string $orderFilter): self |
161
|
|
|
{ |
162
|
|
|
$this->orderFilter = $orderFilter; |
163
|
|
|
return $this; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @return int |
168
|
|
|
*/ |
169
|
|
|
public function getLimit(): int |
170
|
|
|
{ |
171
|
|
|
return $this->limit; |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
/** |
175
|
|
|
* @param int $limit |
176
|
|
|
* @return GetOpenOrdersRequest |
177
|
|
|
*/ |
178
|
|
|
public function setLimit(int $limit): self |
179
|
|
|
{ |
180
|
|
|
$this->limit = $limit; |
181
|
|
|
return $this; |
182
|
|
|
} |
183
|
|
|
|
184
|
|
|
/** |
185
|
|
|
* @return string |
186
|
|
|
*/ |
187
|
|
|
public function getCursor(): string |
188
|
|
|
{ |
189
|
|
|
return $this->cursor; |
190
|
|
|
} |
191
|
|
|
|
192
|
|
|
/** |
193
|
|
|
* @param string $cursor |
194
|
|
|
* @return GetOpenOrdersRequest |
195
|
|
|
*/ |
196
|
|
|
public function setCursor(string $cursor): self |
197
|
|
|
{ |
198
|
|
|
$this->cursor = $cursor; |
199
|
|
|
return $this; |
200
|
|
|
} |
201
|
|
|
|
202
|
|
|
|
203
|
|
|
|
204
|
|
|
} |
205
|
|
|
|