Passed
Pull Request — master (#7)
by Vladislav
03:08
created

TradeHistoryRequest::getFromTradeId()   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\Spot\Trade\TradeHistory\Request;
3
4
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
5
6
/**
7
 * Notice: If startTime is not specified, you can only query for records in the last 7 days.
8
 * If you want to query for records older than 7 days, startTime is required.
9
 * If the orderId is null, fromTicketId is passed, and toTicketId is null,
10
 * then the result is sorted by ticketId in ascend. Otherwise, the result is sorted by ticketId in descend.
11
 */
12
class TradeHistoryRequest extends AbstractParameters
13
{
14
    /**
15
     * Name of the trading pair
16
     * @var string $symbol
17
     */
18
    protected string $symbol;
19
20
    /**
21
     * Order ID
22
     * @var int $orderId
23
     */
24
    protected int $orderId;
25
26
    /**
27
     * Default value is 50, max 50
28
     * @var int $limit
29
     */
30
    protected int $limit;
31
32
    /**
33
     * Start timestamp (ms)
34
     * @var int $startTime
35
     */
36
    protected int $startTime;
37
38
    /**
39
     * End time timestamp (ms)
40
     * @var int $endTime
41
     */
42
    protected int $endTime;
43
44
    /**
45
     * Query greater than the trade ID
46
     * @var int $fromTradeId
47
     */
48
    protected int $fromTradeId;
49
50
    /**
51
     * Query smaller than the trade ID
52
     * @var int $toTradeId
53
     */
54
    protected int $toTradeId;
55
56
    /**
57
     * @return string
58
     */
59
    public function getSymbol(): string
60
    {
61
        return $this->symbol;
62
    }
63
64
    /**
65
     * @param string $symbol
66
     * @return TradeHistoryRequest
67
     */
68
    public function setSymbol(string $symbol): self
69
    {
70
        $this->symbol = $symbol;
71
        return $this;
72
    }
73
74
    /**
75
     * @return int
76
     */
77
    public function getOrderId(): int
78
    {
79
        return $this->orderId;
80
    }
81
82
    /**
83
     * @param int $orderId
84
     * @return TradeHistoryRequest
85
     */
86
    public function setOrderId(int $orderId): self
87
    {
88
        $this->orderId = $orderId;
89
        return $this;
90
    }
91
92
    /**
93
     * @return int
94
     */
95
    public function getEndTime(): int
96
    {
97
        return $this->endTime;
98
    }
99
100
    /**
101
     * @param int $endTime
102
     * @return TradeHistoryRequest
103
     */
104
    public function setEndTime(int $endTime): self
105
    {
106
        $this->endTime = $endTime;
107
        return $this;
108
    }
109
110
    /**
111
     * @return int
112
     */
113
    public function getStartTime(): int
114
    {
115
        return $this->startTime;
116
    }
117
118
    /**
119
     * @param int $startTime
120
     * @return TradeHistoryRequest
121
     */
122
    public function setStartTime(int $startTime): self
123
    {
124
        $this->startTime = $startTime;
125
        return $this;
126
    }
127
128
    /**
129
     * @return int
130
     */
131
    public function getLimit(): int
132
    {
133
        return $this->limit;
134
    }
135
136
    /**
137
     * @param int $limit
138
     * @return TradeHistoryRequest
139
     */
140
    public function setLimit(int $limit): self
141
    {
142
        $this->limit = $limit;
143
        return $this;
144
    }
145
146
    /**
147
     * @return int
148
     */
149
    public function getToTradeId(): int
150
    {
151
        return $this->toTradeId;
152
    }
153
154
    /**
155
     * @param int $toTradeId
156
     * @return TradeHistoryRequest
157
     */
158
    public function setToTradeId(int $toTradeId): self
159
    {
160
        $this->toTradeId = $toTradeId;
161
        return $this;
162
    }
163
164
    /**
165
     * @return int
166
     */
167
    public function getFromTradeId(): int
168
    {
169
        return $this->fromTradeId;
170
    }
171
172
    /**
173
     * @param int $fromTradeId
174
     * @return TradeHistoryRequest
175
     */
176
    public function setFromTradeId(int $fromTradeId): self
177
    {
178
        $this->fromTradeId = $fromTradeId;
179
        return $this;
180
    }
181
}