1 | <?php |
||
15 | class Account extends Api |
||
16 | { |
||
17 | /** |
||
18 | * @param bool|null $needSequence |
||
19 | * @return array |
||
20 | * @throws GuzzleException |
||
21 | * @throws TransformResponseException |
||
22 | */ |
||
23 | 1 | public function getBalances(?bool $needSequence = null): array |
|
27 | |||
28 | /** |
||
29 | * @return int |
||
30 | * @throws GuzzleException |
||
31 | * @throws TransformResponseException |
||
32 | */ |
||
33 | 1 | public function headBalances(): int |
|
38 | |||
39 | /** |
||
40 | * @param string $currency |
||
41 | * @param bool|null $needSequence |
||
42 | * @return array |
||
43 | * @throws GuzzleException |
||
44 | * @throws TransformResponseException |
||
45 | */ |
||
46 | 1 | public function getBalance(string $currency, ?bool $needSequence = null): array |
|
50 | |||
51 | /** |
||
52 | * @param string $currency |
||
53 | * @return array |
||
54 | * @throws Exception|GuzzleException |
||
55 | */ |
||
56 | 1 | public function getDepositAddress(string $currency): array |
|
60 | |||
61 | /** |
||
62 | * @param string $currency |
||
63 | * @return array |
||
64 | * @throws Exception|GuzzleException |
||
65 | */ |
||
66 | 1 | public function setDepositAddress(string $currency): array |
|
72 | |||
73 | /** |
||
74 | * @param string $currency |
||
75 | * @param float $quantity |
||
76 | * @param string $address |
||
77 | * @param string|null $paymentId |
||
78 | * @return array |
||
79 | * @throws Exception|GuzzleException |
||
80 | */ |
||
81 | 1 | public function withdraw(string $currency, float $quantity, string $address, ?string $paymentId = null): array |
|
96 | |||
97 | /** |
||
98 | * @param string $uuid |
||
99 | * @return array |
||
100 | * @throws Exception|GuzzleException |
||
101 | */ |
||
102 | 1 | public function getOrder(string $uuid): array |
|
106 | |||
107 | /** |
||
108 | * @param string|null $marketSymbol |
||
109 | * @param array|null $pagination |
||
110 | * @return array |
||
111 | * @throws GuzzleException |
||
112 | * @throws TransformResponseException |
||
113 | */ |
||
114 | 1 | public function getOrderHistory(?string $marketSymbol = null, ?array $pagination = null): array |
|
115 | { |
||
116 | 1 | $options = []; |
|
117 | 1 | if (!is_null($marketSymbol)) $options['query'] = ['marketSymbol' => $marketSymbol]; |
|
118 | 1 | if (is_array($pagination)) |
|
119 | 1 | foreach ($pagination as $key => $value) |
|
120 | 1 | $options['query'][$key] = $value; |
|
121 | |||
122 | 1 | return $this->rest('GET', '/orders/closed', $options); |
|
123 | } |
||
124 | |||
125 | /** |
||
126 | * @param string|null $currencySymbol |
||
127 | * @param string|null $status |
||
128 | * @return array |
||
129 | * @throws Exception|GuzzleException |
||
130 | */ |
||
131 | 1 | public function getWithdrawalHistory(?string $currencySymbol = null, ?string $status = null): array |
|
135 | |||
136 | /** |
||
137 | * @param string $whatHistory |
||
138 | * @param string $currencySymbol |
||
139 | * @param string $status |
||
140 | * @return array |
||
141 | * @throws Exception|GuzzleException |
||
142 | */ |
||
143 | 2 | private function getHistory(string $whatHistory, ?string $currencySymbol, ?string $status): array |
|
152 | |||
153 | /** |
||
154 | * @param string|null $currencySymbol |
||
155 | * @param string|null $status |
||
156 | * @return array |
||
157 | * @throws Exception|GuzzleException |
||
158 | */ |
||
159 | 1 | public function getDepositHistory(?string $currencySymbol = null, ?string $status = null): array |
|
163 | } |