| Total Complexity | 75 |
| Total Lines | 893 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Complex classes like GetOrderListResponse often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use GetOrderListResponse, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 8 | class GetOrderListResponse extends AbstractResponse implements IGetOrderListResponseInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Symbol name |
||
| 12 | * @var string $symbol |
||
| 13 | */ |
||
| 14 | private string $symbol; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Order ID |
||
| 18 | * @var string $orderId |
||
| 19 | */ |
||
| 20 | private string $orderId; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * User customised order ID. |
||
| 24 | * @var string $orderLinkId |
||
| 25 | */ |
||
| 26 | private string $orderLinkId; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Buy,Sell |
||
| 30 | * @var string $side |
||
| 31 | */ |
||
| 32 | private string $side; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Order type. Market,Limit. For TP/SL order, it means the order type after triggered |
||
| 36 | * @var string $orderType |
||
| 37 | */ |
||
| 38 | private string $orderType; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Order price |
||
| 42 | * @var float $price |
||
| 43 | */ |
||
| 44 | private float $price; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Order quantity |
||
| 48 | * @var float $qty |
||
| 49 | */ |
||
| 50 | private float $qty; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Time in force |
||
| 54 | * @var string $timeInForce |
||
| 55 | */ |
||
| 56 | private string $timeInForce; |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Order status |
||
| 60 | * @var string $orderStatus |
||
| 61 | */ |
||
| 62 | private string $orderStatus; |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Position index. 0: one-way mode, 1: buy side hedge mode, 2: sell side hedge mode |
||
| 66 | * @var int $positionIdx |
||
| 67 | */ |
||
| 68 | private int $positionIdx; |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Last price when place the order |
||
| 72 | * @var float $lastPriceOnCreated |
||
| 73 | */ |
||
| 74 | private float $lastPriceOnCreated; |
||
| 75 | |||
| 76 | /** |
||
| 77 | * Order created timestamp (ms) |
||
| 78 | * @var \DateTime $createdTime |
||
| 79 | */ |
||
| 80 | private \DateTime $createdTime; |
||
| 81 | |||
| 82 | /** |
||
| 83 | * Order updated timestamp (ms) |
||
| 84 | * @var \DateTime $updatedTime |
||
| 85 | */ |
||
| 86 | private \DateTime $updatedTime; |
||
| 87 | |||
| 88 | /** |
||
| 89 | * Cancel type |
||
| 90 | * @var string $cancelType |
||
| 91 | */ |
||
| 92 | private string $cancelType; |
||
| 93 | |||
| 94 | /** |
||
| 95 | * Reject reason |
||
| 96 | * @var string $rejectReason |
||
| 97 | */ |
||
| 98 | private string $rejectReason; |
||
| 99 | |||
| 100 | /** |
||
| 101 | * Stop order type |
||
| 102 | * @var string $stopOrderType |
||
| 103 | */ |
||
| 104 | private string $stopOrderType; |
||
| 105 | |||
| 106 | /** |
||
| 107 | * Trigger direction. 1: rise, 2: fall |
||
| 108 | * @var int $triggerDirection |
||
| 109 | */ |
||
| 110 | private int $triggerDirection; |
||
| 111 | |||
| 112 | /** |
||
| 113 | * The trigger type of trigger price |
||
| 114 | * @var string $triggerBy |
||
| 115 | */ |
||
| 116 | private string $triggerBy; |
||
| 117 | |||
| 118 | /** |
||
| 119 | * Trigger price |
||
| 120 | * @var float $triggerPrice |
||
| 121 | */ |
||
| 122 | private float $triggerPrice; |
||
| 123 | |||
| 124 | /** |
||
| 125 | * Cumulative executed order value |
||
| 126 | * @var float $cumExecValue |
||
| 127 | */ |
||
| 128 | private float $cumExecValue; |
||
| 129 | |||
| 130 | /** |
||
| 131 | * Cumulative executed trading fee |
||
| 132 | * @var float $cumExecFee |
||
| 133 | */ |
||
| 134 | private float $cumExecFee; |
||
| 135 | |||
| 136 | /** |
||
| 137 | * Cumulative executed order qty |
||
| 138 | * @var float $cumExecQty |
||
| 139 | */ |
||
| 140 | private float $cumExecQty; |
||
| 141 | |||
| 142 | /** |
||
| 143 | * The estimated value not executed |
||
| 144 | * @var float $leavesValue |
||
| 145 | */ |
||
| 146 | private float $leavesValue; |
||
| 147 | |||
| 148 | /** |
||
| 149 | * The remaining qty not executed |
||
| 150 | * @var float $leavesQty |
||
| 151 | */ |
||
| 152 | private float $leavesQty; |
||
| 153 | |||
| 154 | /** |
||
| 155 | * Take profit price |
||
| 156 | * @var float $takeProfit |
||
| 157 | */ |
||
| 158 | private float $takeProfit; |
||
| 159 | |||
| 160 | /** |
||
| 161 | * Stop loss price |
||
| 162 | * @var float $stopLoss |
||
| 163 | */ |
||
| 164 | private float $stopLoss; |
||
| 165 | |||
| 166 | /** |
||
| 167 | * TP/SL mode, Full: entire position for TP/SL. Partial: partial position tp/sl |
||
| 168 | * @var string $tpslMode |
||
| 169 | */ |
||
| 170 | private string $tpslMode; |
||
| 171 | |||
| 172 | /** |
||
| 173 | * The limit order price when take profit price is triggered |
||
| 174 | * @var float $tpLimitPrice |
||
| 175 | */ |
||
| 176 | private float $tpLimitPrice; |
||
| 177 | |||
| 178 | /** |
||
| 179 | * The limit order price when stop loss price is triggered |
||
| 180 | * @var float $slLimitPrice |
||
| 181 | */ |
||
| 182 | private float $slLimitPrice; |
||
| 183 | |||
| 184 | /** |
||
| 185 | * The price type to trigger take profit |
||
| 186 | * @var string $tpTriggerBy |
||
| 187 | */ |
||
| 188 | private string $tpTriggerBy; |
||
| 189 | |||
| 190 | /** |
||
| 191 | * The price type to trigger stop loss |
||
| 192 | * @var string $slTriggerBy |
||
| 193 | */ |
||
| 194 | private string $slTriggerBy; |
||
| 195 | |||
| 196 | /** |
||
| 197 | * Reduce only. true means reduce position size |
||
| 198 | * @var bool $reduceOnly |
||
| 199 | */ |
||
| 200 | private bool $reduceOnly; |
||
| 201 | |||
| 202 | /** |
||
| 203 | * Close on trigger. What is a close on trigger order?. Keeps "" for option |
||
| 204 | * @var bool $closeOnTrigger |
||
| 205 | */ |
||
| 206 | private bool $closeOnTrigger; |
||
| 207 | |||
| 208 | /** |
||
| 209 | * Paradigm block trade ID |
||
| 210 | * @var string $blockTradeId |
||
| 211 | */ |
||
| 212 | private string $blockTradeId; |
||
| 213 | |||
| 214 | /** |
||
| 215 | * SMP execution type |
||
| 216 | * @var string $smpType |
||
| 217 | */ |
||
| 218 | private string $smpType; |
||
| 219 | |||
| 220 | /** |
||
| 221 | * Smp group ID. If the uid has no group, it is 0 by default |
||
| 222 | * @var int $smpGroup |
||
| 223 | */ |
||
| 224 | private int $smpGroup; |
||
| 225 | |||
| 226 | /** |
||
| 227 | * The counterparty's orderID which triggers this SMP execution |
||
| 228 | * @var string $smpOrderId |
||
| 229 | */ |
||
| 230 | private string $smpOrderId; |
||
| 231 | |||
| 232 | public function __construct(array $data) |
||
| 233 | { |
||
| 234 | |||
| 235 | } |
||
| 236 | |||
| 237 | /** |
||
| 238 | * @return string |
||
| 239 | */ |
||
| 240 | public function getSymbol(): string |
||
| 241 | { |
||
| 242 | return $this->symbol; |
||
| 243 | } |
||
| 244 | |||
| 245 | /** |
||
| 246 | * @param string $symbol |
||
| 247 | * @return GetOrderListResponse |
||
| 248 | */ |
||
| 249 | private function setSymbol(string $symbol): self |
||
|
|
|||
| 250 | { |
||
| 251 | $this->symbol = $symbol; |
||
| 252 | return $this; |
||
| 253 | } |
||
| 254 | |||
| 255 | /** |
||
| 256 | * @return string |
||
| 257 | */ |
||
| 258 | public function getOrderId(): string |
||
| 259 | { |
||
| 260 | return $this->orderId; |
||
| 261 | } |
||
| 262 | |||
| 263 | /** |
||
| 264 | * @param string $orderId |
||
| 265 | * @return GetOrderListResponse |
||
| 266 | */ |
||
| 267 | private function setOrderId(string $orderId): self |
||
| 268 | { |
||
| 269 | $this->orderId = $orderId; |
||
| 270 | return $this; |
||
| 271 | } |
||
| 272 | |||
| 273 | /** |
||
| 274 | * @return string |
||
| 275 | */ |
||
| 276 | public function getOrderLinkId(): string |
||
| 277 | { |
||
| 278 | return $this->orderLinkId; |
||
| 279 | } |
||
| 280 | |||
| 281 | /** |
||
| 282 | * @param string $orderLinkId |
||
| 283 | * @return GetOrderListResponse |
||
| 284 | */ |
||
| 285 | private function setOrderLinkId(string $orderLinkId): self |
||
| 286 | { |
||
| 287 | $this->orderLinkId = $orderLinkId; |
||
| 288 | return $this; |
||
| 289 | } |
||
| 290 | |||
| 291 | /** |
||
| 292 | * @return string |
||
| 293 | */ |
||
| 294 | public function getSide(): string |
||
| 295 | { |
||
| 296 | return $this->side; |
||
| 297 | } |
||
| 298 | |||
| 299 | /** |
||
| 300 | * @param string $side |
||
| 301 | * @return GetOrderListResponse |
||
| 302 | */ |
||
| 303 | private function setSide(string $side): self |
||
| 304 | { |
||
| 305 | $this->side = $side; |
||
| 306 | return $this; |
||
| 307 | } |
||
| 308 | |||
| 309 | /** |
||
| 310 | * @return string |
||
| 311 | */ |
||
| 312 | public function getOrderType(): string |
||
| 313 | { |
||
| 314 | return $this->orderType; |
||
| 315 | } |
||
| 316 | |||
| 317 | /** |
||
| 318 | * @param string $orderType |
||
| 319 | * @return GetOrderListResponse |
||
| 320 | */ |
||
| 321 | private function setOrderType(string $orderType): self |
||
| 322 | { |
||
| 323 | $this->orderType = $orderType; |
||
| 324 | return $this; |
||
| 325 | } |
||
| 326 | |||
| 327 | /** |
||
| 328 | * @return float |
||
| 329 | */ |
||
| 330 | public function getPrice(): float |
||
| 331 | { |
||
| 332 | return $this->price; |
||
| 333 | } |
||
| 334 | |||
| 335 | /** |
||
| 336 | * @param float $price |
||
| 337 | * @return GetOrderListResponse |
||
| 338 | */ |
||
| 339 | public function setPrice(float $price): self |
||
| 340 | { |
||
| 341 | $this->price = $price; |
||
| 342 | return $this; |
||
| 343 | } |
||
| 344 | |||
| 345 | /** |
||
| 346 | * @return float |
||
| 347 | */ |
||
| 348 | public function getQty(): float |
||
| 349 | { |
||
| 350 | return $this->qty; |
||
| 351 | } |
||
| 352 | |||
| 353 | /** |
||
| 354 | * @param float $qty |
||
| 355 | * @return GetOrderListResponse |
||
| 356 | */ |
||
| 357 | private function setQty(float $qty): self |
||
| 358 | { |
||
| 359 | $this->qty = $qty; |
||
| 360 | return $this; |
||
| 361 | } |
||
| 362 | |||
| 363 | /** |
||
| 364 | * @return string |
||
| 365 | */ |
||
| 366 | public function getTimeInForce(): string |
||
| 367 | { |
||
| 368 | return $this->timeInForce; |
||
| 369 | } |
||
| 370 | |||
| 371 | /** |
||
| 372 | * @param string $timeInForce |
||
| 373 | * @return GetOrderListResponse |
||
| 374 | */ |
||
| 375 | private function setTimeInForce(string $timeInForce): self |
||
| 376 | { |
||
| 377 | $this->timeInForce = $timeInForce; |
||
| 378 | return $this; |
||
| 379 | } |
||
| 380 | |||
| 381 | /** |
||
| 382 | * @return string |
||
| 383 | */ |
||
| 384 | public function getOrderStatus(): string |
||
| 385 | { |
||
| 386 | return $this->orderStatus; |
||
| 387 | } |
||
| 388 | |||
| 389 | /** |
||
| 390 | * @param string $orderStatus |
||
| 391 | * @return GetOrderListResponse |
||
| 392 | */ |
||
| 393 | private function setOrderStatus(string $orderStatus): self |
||
| 394 | { |
||
| 395 | $this->orderStatus = $orderStatus; |
||
| 396 | return $this; |
||
| 397 | } |
||
| 398 | |||
| 399 | /** |
||
| 400 | * @return int |
||
| 401 | */ |
||
| 402 | public function getPositionIdx(): int |
||
| 403 | { |
||
| 404 | return $this->positionIdx; |
||
| 405 | } |
||
| 406 | |||
| 407 | /** |
||
| 408 | * @param int $positionIdx |
||
| 409 | * @return GetOrderListResponse |
||
| 410 | */ |
||
| 411 | private function setPositionIdx(int $positionIdx): self |
||
| 412 | { |
||
| 413 | $this->positionIdx = $positionIdx; |
||
| 414 | return $this; |
||
| 415 | } |
||
| 416 | |||
| 417 | /** |
||
| 418 | * @return float |
||
| 419 | */ |
||
| 420 | public function getLastPriceOnCreated(): float |
||
| 421 | { |
||
| 422 | return $this->lastPriceOnCreated; |
||
| 423 | } |
||
| 424 | |||
| 425 | /** |
||
| 426 | * @param float $lastPriceOnCreated |
||
| 427 | * @return GetOrderListResponse |
||
| 428 | */ |
||
| 429 | private function setLastPriceOnCreated(float $lastPriceOnCreated): self |
||
| 430 | { |
||
| 431 | $this->lastPriceOnCreated = $lastPriceOnCreated; |
||
| 432 | return $this; |
||
| 433 | } |
||
| 434 | |||
| 435 | /** |
||
| 436 | * @return \DateTime |
||
| 437 | */ |
||
| 438 | public function getCreatedTime(): \DateTime |
||
| 439 | { |
||
| 440 | return $this->createdTime; |
||
| 441 | } |
||
| 442 | |||
| 443 | /** |
||
| 444 | * @param string $createdTime |
||
| 445 | * @return GetOrderListResponse |
||
| 446 | */ |
||
| 447 | private function setCreatedTime(string $createdTime): self |
||
| 448 | { |
||
| 449 | $this->createdTime = DateTimeHelper::makeFromTimestamp($createdTime); |
||
| 450 | return $this; |
||
| 451 | } |
||
| 452 | |||
| 453 | /** |
||
| 454 | * @return \DateTime |
||
| 455 | */ |
||
| 456 | public function getUpdatedTime(): \DateTime |
||
| 457 | { |
||
| 458 | return $this->updatedTime; |
||
| 459 | } |
||
| 460 | |||
| 461 | /** |
||
| 462 | * @param string $updatedTime |
||
| 463 | * @return GetOrderListResponse |
||
| 464 | */ |
||
| 465 | private function setUpdatedTime(string $updatedTime): self |
||
| 466 | { |
||
| 467 | $this->updatedTime = DateTimeHelper::makeFromTimestamp($updatedTime); |
||
| 468 | return $this; |
||
| 469 | } |
||
| 470 | |||
| 471 | /** |
||
| 472 | * @return string |
||
| 473 | */ |
||
| 474 | public function getCancelType(): string |
||
| 475 | { |
||
| 476 | return $this->cancelType; |
||
| 477 | } |
||
| 478 | |||
| 479 | /** |
||
| 480 | * @param string $cancelType |
||
| 481 | * @return GetOrderListResponse |
||
| 482 | */ |
||
| 483 | private function setCancelType(string $cancelType): self |
||
| 484 | { |
||
| 485 | $this->cancelType = $cancelType; |
||
| 486 | return $this; |
||
| 487 | } |
||
| 488 | |||
| 489 | /** |
||
| 490 | * @return string |
||
| 491 | */ |
||
| 492 | public function getRejectReason(): string |
||
| 493 | { |
||
| 494 | return $this->rejectReason; |
||
| 495 | } |
||
| 496 | |||
| 497 | /** |
||
| 498 | * @param string $rejectReason |
||
| 499 | * @return GetOrderListResponse |
||
| 500 | */ |
||
| 501 | private function setRejectReason(string $rejectReason): self |
||
| 502 | { |
||
| 503 | $this->rejectReason = $rejectReason; |
||
| 504 | return $this; |
||
| 505 | } |
||
| 506 | |||
| 507 | /** |
||
| 508 | * @return string |
||
| 509 | */ |
||
| 510 | public function getStopOrderType(): string |
||
| 511 | { |
||
| 512 | return $this->stopOrderType; |
||
| 513 | } |
||
| 514 | |||
| 515 | /** |
||
| 516 | * @param string $stopOrderType |
||
| 517 | * @return GetOrderListResponse |
||
| 518 | */ |
||
| 519 | private function setStopOrderType(string $stopOrderType): self |
||
| 520 | { |
||
| 521 | $this->stopOrderType = $stopOrderType; |
||
| 522 | return $this; |
||
| 523 | } |
||
| 524 | |||
| 525 | /** |
||
| 526 | * @return int |
||
| 527 | */ |
||
| 528 | public function getTriggerDirection(): int |
||
| 529 | { |
||
| 530 | return $this->triggerDirection; |
||
| 531 | } |
||
| 532 | |||
| 533 | /** |
||
| 534 | * @param int $triggerDirection |
||
| 535 | * @return GetOrderListResponse |
||
| 536 | */ |
||
| 537 | private function setTriggerDirection(int $triggerDirection): self |
||
| 538 | { |
||
| 539 | $this->triggerDirection = $triggerDirection; |
||
| 540 | return $this; |
||
| 541 | } |
||
| 542 | |||
| 543 | /** |
||
| 544 | * @return string |
||
| 545 | */ |
||
| 546 | public function getTriggerBy(): string |
||
| 547 | { |
||
| 548 | return $this->triggerBy; |
||
| 549 | } |
||
| 550 | |||
| 551 | /** |
||
| 552 | * @param string $triggerBy |
||
| 553 | * @return GetOrderListResponse |
||
| 554 | */ |
||
| 555 | private function setTriggerBy(string $triggerBy): self |
||
| 556 | { |
||
| 557 | $this->triggerBy = $triggerBy; |
||
| 558 | return $this; |
||
| 559 | } |
||
| 560 | |||
| 561 | /** |
||
| 562 | * @return float |
||
| 563 | */ |
||
| 564 | public function getTriggerPrice(): float |
||
| 565 | { |
||
| 566 | return $this->triggerPrice; |
||
| 567 | } |
||
| 568 | |||
| 569 | /** |
||
| 570 | * @param float $triggerPrice |
||
| 571 | * @return GetOrderListResponse |
||
| 572 | */ |
||
| 573 | private function setTriggerPrice(float $triggerPrice): self |
||
| 574 | { |
||
| 575 | $this->triggerPrice = $triggerPrice; |
||
| 576 | return $this; |
||
| 577 | } |
||
| 578 | |||
| 579 | /** |
||
| 580 | * @return float |
||
| 581 | */ |
||
| 582 | public function getCumExecValue(): float |
||
| 583 | { |
||
| 584 | return $this->cumExecValue; |
||
| 585 | } |
||
| 586 | |||
| 587 | /** |
||
| 588 | * @param float $cumExecValue |
||
| 589 | * @return GetOrderListResponse |
||
| 590 | */ |
||
| 591 | private function setCumExecValue(float $cumExecValue): self |
||
| 592 | { |
||
| 593 | $this->cumExecValue = $cumExecValue; |
||
| 594 | return $this; |
||
| 595 | } |
||
| 596 | |||
| 597 | /** |
||
| 598 | * @return float |
||
| 599 | */ |
||
| 600 | public function getCumExecFee(): float |
||
| 601 | { |
||
| 602 | return $this->cumExecFee; |
||
| 603 | } |
||
| 604 | |||
| 605 | /** |
||
| 606 | * @param float $cumExecFee |
||
| 607 | * @return GetOrderListResponse |
||
| 608 | */ |
||
| 609 | private function setCumExecFee(float $cumExecFee): self |
||
| 610 | { |
||
| 611 | $this->cumExecFee = $cumExecFee; |
||
| 612 | return $this; |
||
| 613 | } |
||
| 614 | |||
| 615 | /** |
||
| 616 | * @return float |
||
| 617 | */ |
||
| 618 | public function getCumExecQty(): float |
||
| 619 | { |
||
| 620 | return $this->cumExecQty; |
||
| 621 | } |
||
| 622 | |||
| 623 | /** |
||
| 624 | * @param float $cumExecQty |
||
| 625 | * @return GetOrderListResponse |
||
| 626 | */ |
||
| 627 | public function setCumExecQty(float $cumExecQty): self |
||
| 628 | { |
||
| 629 | $this->cumExecQty = $cumExecQty; |
||
| 630 | return $this; |
||
| 631 | } |
||
| 632 | |||
| 633 | /** |
||
| 634 | * @return float |
||
| 635 | */ |
||
| 636 | public function getLeavesValue(): float |
||
| 637 | { |
||
| 638 | return $this->leavesValue; |
||
| 639 | } |
||
| 640 | |||
| 641 | /** |
||
| 642 | * @param float $leavesValue |
||
| 643 | * @return GetOrderListResponse |
||
| 644 | */ |
||
| 645 | private function setLeavesValue(float $leavesValue): self |
||
| 646 | { |
||
| 647 | $this->leavesValue = $leavesValue; |
||
| 648 | return $this; |
||
| 649 | } |
||
| 650 | |||
| 651 | /** |
||
| 652 | * @return float |
||
| 653 | */ |
||
| 654 | public function getLeavesQty(): float |
||
| 655 | { |
||
| 656 | return $this->leavesQty; |
||
| 657 | } |
||
| 658 | |||
| 659 | /** |
||
| 660 | * @param float $leavesQty |
||
| 661 | * @return GetOrderListResponse |
||
| 662 | */ |
||
| 663 | private function setLeavesQty(float $leavesQty): self |
||
| 664 | { |
||
| 665 | $this->leavesQty = $leavesQty; |
||
| 666 | return $this; |
||
| 667 | } |
||
| 668 | |||
| 669 | /** |
||
| 670 | * @return float |
||
| 671 | */ |
||
| 672 | public function getTakeProfit(): float |
||
| 673 | { |
||
| 674 | return $this->takeProfit; |
||
| 675 | } |
||
| 676 | |||
| 677 | /** |
||
| 678 | * @param float $takeProfit |
||
| 679 | * @return GetOrderListResponse |
||
| 680 | */ |
||
| 681 | private function setTakeProfit(float $takeProfit): self |
||
| 682 | { |
||
| 683 | $this->takeProfit = $takeProfit; |
||
| 684 | return $this; |
||
| 685 | } |
||
| 686 | |||
| 687 | /** |
||
| 688 | * @return float |
||
| 689 | */ |
||
| 690 | public function getStopLoss(): float |
||
| 691 | { |
||
| 692 | return $this->stopLoss; |
||
| 693 | } |
||
| 694 | |||
| 695 | /** |
||
| 696 | * @param float $stopLoss |
||
| 697 | * @return GetOrderListResponse |
||
| 698 | */ |
||
| 699 | private function setStopLoss(float $stopLoss): self |
||
| 700 | { |
||
| 701 | $this->stopLoss = $stopLoss; |
||
| 702 | return $this; |
||
| 703 | } |
||
| 704 | |||
| 705 | /** |
||
| 706 | * @return string |
||
| 707 | */ |
||
| 708 | public function getTpslMode(): string |
||
| 709 | { |
||
| 710 | return $this->tpslMode; |
||
| 711 | } |
||
| 712 | |||
| 713 | /** |
||
| 714 | * @param string $tpslMode |
||
| 715 | * @return GetOrderListResponse |
||
| 716 | */ |
||
| 717 | private function setTpslMode(string $tpslMode): self |
||
| 718 | { |
||
| 719 | $this->tpslMode = $tpslMode; |
||
| 720 | return $this; |
||
| 721 | } |
||
| 722 | |||
| 723 | /** |
||
| 724 | * @return float |
||
| 725 | */ |
||
| 726 | public function getTpLimitPrice(): float |
||
| 727 | { |
||
| 728 | return $this->tpLimitPrice; |
||
| 729 | } |
||
| 730 | |||
| 731 | /** |
||
| 732 | * @param float $tpLimitPrice |
||
| 733 | * @return GetOrderListResponse |
||
| 734 | */ |
||
| 735 | private function setTpLimitPrice(float $tpLimitPrice): self |
||
| 736 | { |
||
| 737 | $this->tpLimitPrice = $tpLimitPrice; |
||
| 738 | return $this; |
||
| 739 | } |
||
| 740 | |||
| 741 | /** |
||
| 742 | * @return float |
||
| 743 | */ |
||
| 744 | public function getSlLimitPrice(): float |
||
| 745 | { |
||
| 746 | return $this->slLimitPrice; |
||
| 747 | } |
||
| 748 | |||
| 749 | /** |
||
| 750 | * @param float $slLimitPrice |
||
| 751 | * @return GetOrderListResponse |
||
| 752 | */ |
||
| 753 | private function setSlLimitPrice(float $slLimitPrice): self |
||
| 754 | { |
||
| 755 | $this->slLimitPrice = $slLimitPrice; |
||
| 756 | return $this; |
||
| 757 | } |
||
| 758 | |||
| 759 | /** |
||
| 760 | * @return string |
||
| 761 | */ |
||
| 762 | public function getTpTriggerBy(): string |
||
| 763 | { |
||
| 764 | return $this->tpTriggerBy; |
||
| 765 | } |
||
| 766 | |||
| 767 | /** |
||
| 768 | * @param string $tpTriggerBy |
||
| 769 | * @return GetOrderListResponse |
||
| 770 | */ |
||
| 771 | private function setTpTriggerBy(string $tpTriggerBy): self |
||
| 772 | { |
||
| 773 | $this->tpTriggerBy = $tpTriggerBy; |
||
| 774 | return $this; |
||
| 775 | } |
||
| 776 | |||
| 777 | /** |
||
| 778 | * @return string |
||
| 779 | */ |
||
| 780 | public function getSlTriggerBy(): string |
||
| 781 | { |
||
| 782 | return $this->slTriggerBy; |
||
| 783 | } |
||
| 784 | |||
| 785 | /** |
||
| 786 | * @param string $slTriggerBy |
||
| 787 | * @return GetOrderListResponse |
||
| 788 | */ |
||
| 789 | private function setSlTriggerBy(string $slTriggerBy): self |
||
| 790 | { |
||
| 791 | $this->slTriggerBy = $slTriggerBy; |
||
| 792 | return $this; |
||
| 793 | } |
||
| 794 | |||
| 795 | /** |
||
| 796 | * @return bool |
||
| 797 | */ |
||
| 798 | public function isReduceOnly(): bool |
||
| 799 | { |
||
| 800 | return $this->reduceOnly; |
||
| 801 | } |
||
| 802 | |||
| 803 | /** |
||
| 804 | * @param bool $reduceOnly |
||
| 805 | * @return GetOrderListResponse |
||
| 806 | */ |
||
| 807 | private function setReduceOnly(bool $reduceOnly): self |
||
| 808 | { |
||
| 809 | $this->reduceOnly = $reduceOnly; |
||
| 810 | return $this; |
||
| 811 | } |
||
| 812 | |||
| 813 | /** |
||
| 814 | * @return bool |
||
| 815 | */ |
||
| 816 | public function isCloseOnTrigger(): bool |
||
| 817 | { |
||
| 818 | return $this->closeOnTrigger; |
||
| 819 | } |
||
| 820 | |||
| 821 | /** |
||
| 822 | * @param bool $closeOnTrigger |
||
| 823 | * @return GetOrderListResponse |
||
| 824 | */ |
||
| 825 | private function setCloseOnTrigger(bool $closeOnTrigger): self |
||
| 826 | { |
||
| 827 | $this->closeOnTrigger = $closeOnTrigger; |
||
| 828 | return $this; |
||
| 829 | } |
||
| 830 | |||
| 831 | /** |
||
| 832 | * @return string |
||
| 833 | */ |
||
| 834 | public function getBlockTradeId(): string |
||
| 835 | { |
||
| 836 | return $this->blockTradeId; |
||
| 837 | } |
||
| 838 | |||
| 839 | /** |
||
| 840 | * @param string $blockTradeId |
||
| 841 | * @return GetOrderListResponse |
||
| 842 | */ |
||
| 843 | private function setBlockTradeId(string $blockTradeId): self |
||
| 844 | { |
||
| 845 | $this->blockTradeId = $blockTradeId; |
||
| 846 | return $this; |
||
| 847 | } |
||
| 848 | |||
| 849 | /** |
||
| 850 | * @return string |
||
| 851 | */ |
||
| 852 | public function getSmpType(): string |
||
| 853 | { |
||
| 854 | return $this->smpType; |
||
| 855 | } |
||
| 856 | |||
| 857 | /** |
||
| 858 | * @param string $smpType |
||
| 859 | * @return GetOrderListResponse |
||
| 860 | */ |
||
| 861 | private function setSmpType(string $smpType): self |
||
| 865 | } |
||
| 866 | |||
| 867 | /** |
||
| 868 | * @return int |
||
| 869 | */ |
||
| 870 | public function getSmpGroup(): int |
||
| 871 | { |
||
| 872 | return $this->smpGroup; |
||
| 873 | } |
||
| 874 | |||
| 875 | /** |
||
| 876 | * @param int $smpGroup |
||
| 877 | * @return GetOrderListResponse |
||
| 878 | */ |
||
| 879 | private function setSmpGroup(int $smpGroup): self |
||
| 880 | { |
||
| 881 | $this->smpGroup = $smpGroup; |
||
| 882 | return $this; |
||
| 883 | } |
||
| 884 | |||
| 885 | /** |
||
| 886 | * @return string |
||
| 887 | */ |
||
| 888 | public function getSmpOrderId(): string |
||
| 889 | { |
||
| 890 | return $this->smpOrderId; |
||
| 891 | } |
||
| 892 | |||
| 893 | /** |
||
| 894 | * @param string $smpOrderId |
||
| 895 | * @return GetOrderListResponse |
||
| 896 | */ |
||
| 897 | private function setSmpOrderId(string $smpOrderId): self |
||
| 901 | } |
||
| 902 | |||
| 903 | |||
| 904 | } |
This check looks for private methods that have been defined, but are not used inside the class.