Passed
Push — master ( 420501...55c755 )
by Vladislav
04:26 queued 02:03
created

PublicTradingHistoryRequest::getLimit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Carpenstar\ByBitAPI\Derivatives\MarketData\PublicTradingHistory\Request;
3
4
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
5
6
class PublicTradingHistoryRequest extends AbstractParameters
7
{
8
    /**
9
     * Product type.linear
10
     * @var string $category
11
     */
12
    protected string $category = "linear"; // At current time, support linear type only
13
14
    /**
15
     * Symbol name
16
     * @var string
17
     */
18
    protected string $symbol;
19
20
    /**
21
     * Limit for data size per page. [1, 1000]. Default: 500
22
     * @var int $limit
23
     */
24
    protected int $limit = 500;
25
26
    public function __construct()
27
    {
28
        $this->setRequiredField('symbol');
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getCategory(): string
35
    {
36
        return $this->category;
37
    }
38
39
    /**
40
     * @param string $symbol
41
     * @return PublicTradingHistoryRequest
42
     */
43
    public function setSymbol(string $symbol): self
44
    {
45
        $this->symbol = $symbol;
46
        return $this;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getSymbol(): string
53
    {
54
        return $this->symbol;
55
    }
56
57
    /**
58
     * @param int $limit
59
     * @return PublicTradingHistoryRequest
60
     */
61
    public function setLimit(int $limit): self
62
    {
63
        $this->limit = $limit;
64
        return $this;
65
    }
66
67
    /**
68
     * @return int
69
     */
70
    public function getLimit(): int
71
    {
72
        return $this->limit;
73
    }
74
75
76
}