@@ -9,6 +9,23 @@ class ListUserTrades extends AbstractRequest
99 */
1010 protected $ pair ;
1111
12+ /**
13+ * Filter to trades from (including) this sequence number.
14+ * Default behaviour is not to include this filter.
15+ */
16+ protected $ after_seq ;
17+
18+ /**
19+ * Filter to trades before this timestamp.
20+ */
21+ protected $ before ;
22+
23+ /**
24+ * Filter to trades before (excluding) this sequence number.
25+ * Default behaviour is not to include this filter.
26+ */
27+ protected $ before_seq ;
28+
1229 /**
1330 * Limit to this number of trades (default 100).
1431 */
@@ -18,6 +35,12 @@ class ListUserTrades extends AbstractRequest
1835 * Filter to trades on or after this timestamp.
1936 */
2037 protected $ since ;
38+
39+ /**
40+ * If set to true, sorts trades in descending order, otherwise ascending
41+ * order will be assumed.
42+ */
43+ protected $ sort_desc ;
2144
2245 /**
2346 * @return string
@@ -38,6 +61,63 @@ public function setPair(string $pair)
3861 $ this ->pair = $ pair ;
3962 }
4063
64+ /**
65+ * @return int
66+ */
67+ public function getAfterSeq (): int
68+ {
69+ if (!isset ($ this ->after_seq )) {
70+ return 0 ;
71+ }
72+ return $ this ->after_seq ;
73+ }
74+
75+ /**
76+ * @param int $afterSeq
77+ */
78+ public function setAfterSeq (int $ afterSeq )
79+ {
80+ $ this ->after_seq = $ afterSeq ;
81+ }
82+
83+ /**
84+ * @return int
85+ */
86+ public function getBefore (): int
87+ {
88+ if (!isset ($ this ->before )) {
89+ return 0 ;
90+ }
91+ return $ this ->before ;
92+ }
93+
94+ /**
95+ * @param int $before
96+ */
97+ public function setBefore (int $ before )
98+ {
99+ $ this ->before = $ before ;
100+ }
101+
102+ /**
103+ * @return int
104+ */
105+ public function getBeforeSeq (): int
106+ {
107+ if (!isset ($ this ->before_seq )) {
108+ return 0 ;
109+ }
110+ return $ this ->before_seq ;
111+ }
112+
113+ /**
114+ * @param int $beforeSeq
115+ */
116+ public function setBeforeSeq (int $ beforeSeq )
117+ {
118+ $ this ->before_seq = $ beforeSeq ;
119+ }
120+
41121 /**
42122 * @return int
43123 */
@@ -75,6 +155,25 @@ public function setSince(int $since)
75155 {
76156 $ this ->since = $ since ;
77157 }
158+
159+ /**
160+ * @return bool
161+ */
162+ public function getSortDesc (): bool
163+ {
164+ if (!isset ($ this ->sort_desc )) {
165+ return false ;
166+ }
167+ return $ this ->sort_desc ;
168+ }
169+
170+ /**
171+ * @param bool $sortDesc
172+ */
173+ public function setSortDesc (bool $ sortDesc )
174+ {
175+ $ this ->sort_desc = $ sortDesc ;
176+ }
78177}
79178
80179// vi: ft=php
0 commit comments